summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorWanpeng Li <wanpeng.li@linux.intel.com>2014-10-14 10:22:40 +0800
committerIngo Molnar <mingo@kernel.org>2014-10-28 10:48:02 +0100
commitf4e9d94a5bf60193d45f92b136e3d166be3ec8d5 (patch)
treecc5b69ef98a81450aff3d548b155b293b047ca30 /kernel/sched
parent1d7e974cbf2fce2683f34ff33c173fd7ef5478c7 (diff)
downloadblackbird-obmc-linux-f4e9d94a5bf60193d45f92b136e3d166be3ec8d5.tar.gz
blackbird-obmc-linux-f4e9d94a5bf60193d45f92b136e3d166be3ec8d5.zip
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 <wanpeng.li@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1413253360-5318-2-git-send-email-wanpeng.li@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/deadline.c3
1 files changed, 3 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud