]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sched, numa, mm: Add NUMA_MIGRATION feature flag
authorIngo Molnar <mingo@kernel.org>
Sat, 20 Oct 2012 20:20:19 +0000 (22:20 +0200)
committerIngo Molnar <mingo@kernel.org>
Sun, 28 Oct 2012 16:31:18 +0000 (17:31 +0100)
After this patch, doing:

   # echo NO_NUMA_MIGRATION > /sys/kernel/debug/sched_features

Will turn off the NUMA placement logic/policy - but keeps the
working set sampling faults in place.

This allows the debugging of the WSS facility, by using it
but keeping vanilla, non-NUMA CPU and memory placement
policies.

Default enabled. Generates on extra code on !CONFIG_SCHED_DEBUG.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Link: http://lkml.kernel.org/n/tip-xjt7bqjlphxRfjXxasqm4cdv@git.kernel.org
kernel/sched/core.c
kernel/sched/features.h

index 91cc1a5c816646b8e77110a4fcccdc47bb666bc5..b607bc8b833b17a1c5fb05ae4dc7d5a7b409eb41 100644 (file)
@@ -6002,6 +6002,9 @@ void sched_setnode(struct task_struct *p, int node)
        int on_rq, running;
        struct rq *rq;
 
+       if (!sched_feat(NUMA_MIGRATION))
+               return;
+
        rq = task_rq_lock(p, &flags);
        on_rq = p->on_rq;
        running = task_current(rq, p);
index f8a7aebaa022598e651870cd3032082a6f3ef012..1d11f6c7635fef56b1518826f99584d819223b25 100644 (file)
@@ -63,7 +63,10 @@ SCHED_FEAT(RT_RUNTIME_SHARE, true)
 SCHED_FEAT(LB_MIN, false)
 
 #ifdef CONFIG_SCHED_NUMA
+/* Do the working set probing faults: */
 SCHED_FEAT(NUMA,           true)
+/* Do actual migration/placement based on the working set information: */
+SCHED_FEAT(NUMA_MIGRATION, true)
 SCHED_FEAT(NUMA_HOT,       true)
 SCHED_FEAT(NUMA_TTWU_BIAS, false)
 SCHED_FEAT(NUMA_TTWU_TO,   false)