sched/numa: Check sched_feat(NUMA) in migrate_improves_locality()
authorbsegall@google.com <bsegall@google.com>
Tue, 16 Jun 2015 19:18:21 +0000 (12:18 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 7 Jul 2015 06:46:09 +0000 (08:46 +0200)
migrate_improves_locality checked sched_feat(NUMA_FAVOUR_HIGHER) but not
sched_feat(NUMA), so disabling just the NUMA feature would leave it
working off of old data.

Signed-off-by: Ben Segall <bsegall@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/xm26si9rtqbm.fsf@sword-of-the-dawn.mtv.corp.google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c

index d113c3ba8bc44b4f50a12e9c055cb70b63a632fc..98b2b961df33fb9c7fbc46d77d3e7f41b4e736ae 100644 (file)
@@ -5680,8 +5680,8 @@ static bool migrate_improves_locality(struct task_struct *p, struct lb_env *env)
        unsigned long src_faults, dst_faults;
        int src_nid, dst_nid;
 
-       if (!sched_feat(NUMA_FAVOUR_HIGHER) || !p->numa_faults ||
-           !(env->sd->flags & SD_NUMA)) {
+       if (!sched_feat(NUMA) || !sched_feat(NUMA_FAVOUR_HIGHER) ||
+           !p->numa_faults || !(env->sd->flags & SD_NUMA)) {
                return false;
        }