aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMike Galbraith <efault@gmx.de>2009-09-19 10:52:35 -0400
committerIngo Molnar <mingo@elte.hu>2009-09-19 11:11:31 -0400
commit3f04e8cd5b24727a2500f8ab8f3de730ba47b02c (patch)
treed4f11319d7508055dffb13c4aafc623fd3a0180f /kernel
parenta2e7a7eb2fea109891ffff90f947e8306080a2a3 (diff)
sched: Re-add lost cpu_allowed check to sched_fair.c::select_task_rq_fair()
While doing some testing, I pinned mplayer, only to find it following X around like a puppy. Looking at commit c88d591, I found a cpu_allowed check that went AWOL. I plugged it back in where it looks like it needs to go, and now when I say "sit, stay!", mplayer obeys again. 'c88d591 sched: Merge select_task_rq_fair() and sched_balance_self()' accidentally dropped the check, causing wake_affine() to pull pinned tasks - put it back. [ v2: use a cheaper version from Peter ] Signed-off-by: Mike Galbraith <efault@gmx.de> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched_fair.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 29b35a7ec571..566e3bb78ed9 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1339,7 +1339,8 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flag
1339 int sync = wake_flags & WF_SYNC; 1339 int sync = wake_flags & WF_SYNC;
1340 1340
1341 if (sd_flag & SD_BALANCE_WAKE) { 1341 if (sd_flag & SD_BALANCE_WAKE) {
1342 if (sched_feat(AFFINE_WAKEUPS)) 1342 if (sched_feat(AFFINE_WAKEUPS) &&
1343 cpumask_test_cpu(cpu, &p->cpus_allowed))
1343 want_affine = 1; 1344 want_affine = 1;
1344 new_cpu = prev_cpu; 1345 new_cpu = prev_cpu;
1345 } 1346 }