From: Jan Beulich Date: Mon, 9 Feb 2015 11:30:00 +0000 (+0100) Subject: sched/numa: Avoid some pointless iterations X-Git-Tag: omap-for-v4.2/o2_dc~188^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=890a5409f9d0c84d75a1e16eebdfe91d8a57ef1e;p=pandora-kernel.git sched/numa: Avoid some pointless iterations Commit 81907478c431 ("sched/fair: Avoid using uninitialized variable in preferred_group_nid()") unconditionally initializes max_group with NODE_MASK_NONE, this means that when !max_faults (max_group didn't get set), we'll now continue the iteration with an empty mask. Which in turn makes the actual body of the loop go away, so we'll just iterate until completion; short circuit this by breaking out of the loop as soon as this would happen. Signed-off-by: Jan Beulich Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20150209113727.GS5029@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed