Commit-ID: f0c77b62ba9dd2a4026dc6a653d6da9258d083d8 Gitweb: http://git.kernel.org/tip/f0c77b62ba9dd2a4026dc6a653d6da9258d083d8 Author: Ingo Molnar <mingo@xxxxxxxxxx> AuthorDate: Mon, 10 Dec 2012 12:57:00 +0100 Committer: Ingo Molnar <mingo@xxxxxxxxxx> CommitDate: Mon, 10 Dec 2012 12:57:00 +0100 sched: Fix NUMA_EXCLUDE_AFFINE check Mel Gorman reported that the NUMA_EXCLUDE_AFFINE check turned off NUMA balancing on his box - which has a nr_cpus_allowed 80 but 48 online CPUs. Fix the test to be num_cpus_possible() - which would also fix any hotplug variant of the same bug. Reported-by: Mel Gorman <mgorman@xxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 503ec29..9d11a8a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2646,7 +2646,7 @@ static bool task_numa_candidate(struct task_struct *p) /* Don't disturb hard-bound tasks: */ if (sched_feat(NUMA_EXCLUDE_AFFINE)) { - if (p->nr_cpus_allowed != num_online_cpus()) + if (p->nr_cpus_allowed != num_possible_cpus()) return false; } -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html