mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
sched: Move p->nr_cpus_allowed check to select_task_rq()
Move the p->nr_cpus_allowed check into kernel/sched/core.c: select_task_rq(). This change will make fair.c, rt.c, and deadline.c all start with the same logic. Suggested-and-Acked-by: Steven Rostedt <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: "pang.xunlei" <[email protected]> Cc: Linus Torvalds <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
a1bd537335
commit
6c1d9410f0
4 changed files with 2 additions and 10 deletions
|
|
@ -1411,7 +1411,8 @@ out:
|
|||
static inline
|
||||
int select_task_rq(struct task_struct *p, int cpu, int sd_flags, int wake_flags)
|
||||
{
|
||||
cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags);
|
||||
if (p->nr_cpus_allowed > 1)
|
||||
cpu = p->sched_class->select_task_rq(p, cpu, sd_flags, wake_flags);
|
||||
|
||||
/*
|
||||
* In order not to call set_task_cpu() on a blocking task we need
|
||||
|
|
|
|||
|
|
@ -928,9 +928,6 @@ select_task_rq_dl(struct task_struct *p, int cpu, int sd_flag, int flags)
|
|||
struct task_struct *curr;
|
||||
struct rq *rq;
|
||||
|
||||
if (p->nr_cpus_allowed == 1)
|
||||
goto out;
|
||||
|
||||
if (sd_flag != SD_BALANCE_WAKE)
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
|
|
@ -4730,9 +4730,6 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
|
|||
int want_affine = 0;
|
||||
int sync = wake_flags & WF_SYNC;
|
||||
|
||||
if (p->nr_cpus_allowed == 1)
|
||||
return prev_cpu;
|
||||
|
||||
if (sd_flag & SD_BALANCE_WAKE)
|
||||
want_affine = cpumask_test_cpu(cpu, tsk_cpus_allowed(p));
|
||||
|
||||
|
|
|
|||
|
|
@ -1301,9 +1301,6 @@ select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags)
|
|||
struct task_struct *curr;
|
||||
struct rq *rq;
|
||||
|
||||
if (p->nr_cpus_allowed == 1)
|
||||
goto out;
|
||||
|
||||
/* For anything but wake ups, just return the task_cpu */
|
||||
if (sd_flag != SD_BALANCE_WAKE && sd_flag != SD_BALANCE_FORK)
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue