From: Wanpeng Li Date: Tue, 14 Oct 2014 02:22:40 +0000 (+0800) Subject: sched/deadline: Don't balance during wakeup if wakee is pinned X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4e9d94a5bf60193d45f92b136e3d166be3ec8d5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git sched/deadline: Don't balance during wakeup if wakee is pinned Use nr_cpus_allowed to bail from select_task_rq() when only one cpu can be used, and saves some cycles for pinned tasks. Signed-off-by: Wanpeng Li Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Link: http://lkml.kernel.org/r/1413253360-5318-2-git-send-email-wanpeng.li@linux.intel.com Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index fab3bf81bb7c..2e31a30e623c 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -933,6 +933,9 @@ 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;