sched/numa: Detect 'big' processes
Detect 'big' processes for which the one home-node per process isn't
going to work as desired.
The current policy for such tasks is to ignore them entirely and put
the home-node back to -1 (no preference) so they'll behave as if none
of this NUMA home node awareness is there.
The current heuristic for determining if a task is 'big' is if its
consuming more than 1/2 a node's worth of cputime. We might want to
add a term here looking at the RSS of the process and compare this
against the available memory per node.
Since we now do multiple things from the task_work thing, we need to
extend the state to determine which of the things we're there for -- a
change in numa node, or a periodic poll of 'big'-ness.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Rik van Riel <riel@redhat.com>
Cc: Paul Turner <pjt@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/n/tip-nqczclvw4g9p0us0yezui7q5@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>