diff options
author | Shawn Bohrer <sbohrer@rgmadvisors.com> | 2013-10-04 14:24:53 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-06 11:28:40 +0200 |
commit | 6bfa687c19b7ab8adee03f0d43c197c2945dd869 (patch) | |
tree | fdbcfe3a969c935f5c69c868afa6cdca8d514cdf | |
parent | fb869b6e91a3ac235f237f73305ecf34cdc4969b (diff) | |
download | linux-6bfa687c19b7ab8adee03f0d43c197c2945dd869.tar.bz2 |
sched/rt: Remove redundant nr_cpus_allowed test
In 76854c7e8f3f4172fef091e78d88b3b751463ac6 ("sched: Use
rt.nr_cpus_allowed to recover select_task_rq() cycles") an
optimization was added to select_task_rq_rt() that immediately
returns when p->nr_cpus_allowed == 1 at the beginning of the
function.
This makes the latter p->nr_cpus_allowed > 1 check redundant,
which can now be removed.
Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Mike Galbraith <mgalbraith@suse.de>
Cc: tomk@rgmadvisors.com
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1380914693-24634-1-git-send-email-shawn.bohrer@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | kernel/sched/rt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 01970c8e64df..ceebfba0a1dd 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -1213,8 +1213,7 @@ select_task_rq_rt(struct task_struct *p, int sd_flag, int flags) */ if (curr && unlikely(rt_task(curr)) && (curr->nr_cpus_allowed < 2 || - curr->prio <= p->prio) && - (p->nr_cpus_allowed > 1)) { + curr->prio <= p->prio)) { int target = find_lowest_rq(p); if (target != -1) |