Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f04e8cd authored by Mike Galbraith's avatar Mike Galbraith Committed by Ingo Molnar
Browse files

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 c88d5910, 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.

'c88d5910 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: default avatarMike Galbraith <efault@gmx.de>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a2e7a7eb
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1339,7 +1339,8 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flag
	int sync = wake_flags & WF_SYNC;
	int sync = wake_flags & WF_SYNC;


	if (sd_flag & SD_BALANCE_WAKE) {
	if (sd_flag & SD_BALANCE_WAKE) {
		if (sched_feat(AFFINE_WAKEUPS))
		if (sched_feat(AFFINE_WAKEUPS) &&
		    cpumask_test_cpu(cpu, &p->cpus_allowed))
			want_affine = 1;
			want_affine = 1;
		new_cpu = prev_cpu;
		new_cpu = prev_cpu;
	}
	}