* [PATCH] sched/rt: Remove redundant nr_cpus_allowed test
@ 2013-10-04 19:24 Shawn Bohrer
2013-10-04 19:34 ` Steven Rostedt
2013-10-06 14:04 ` [tip:sched/core] " tip-bot for Shawn Bohrer
0 siblings, 2 replies; 3+ messages in thread
From: Shawn Bohrer @ 2013-10-04 19:24 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra
Cc: linux-kernel, Steven Rostedt, Mike Galbraith, tomk, Shawn Bohrer
From: Shawn Bohrer <sbohrer@rgmadvisors.com>
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 and can be removed.
Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
---
kernel/sched/rt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 01970c8..ceebfba 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)
--
1.8.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sched/rt: Remove redundant nr_cpus_allowed test
2013-10-04 19:24 [PATCH] sched/rt: Remove redundant nr_cpus_allowed test Shawn Bohrer
@ 2013-10-04 19:34 ` Steven Rostedt
2013-10-06 14:04 ` [tip:sched/core] " tip-bot for Shawn Bohrer
1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2013-10-04 19:34 UTC (permalink / raw)
To: Shawn Bohrer
Cc: Ingo Molnar, Peter Zijlstra, linux-kernel, Mike Galbraith, tomk,
Shawn Bohrer
On Fri, 4 Oct 2013 14:24:53 -0500
Shawn Bohrer <shawn.bohrer@gmail.com> wrote:
> From: Shawn Bohrer <sbohrer@rgmadvisors.com>
>
> 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 and can be removed.
>
> Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
-- Steve
> ---
> kernel/sched/rt.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 01970c8..ceebfba 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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip:sched/core] sched/rt: Remove redundant nr_cpus_allowed test
2013-10-04 19:24 [PATCH] sched/rt: Remove redundant nr_cpus_allowed test Shawn Bohrer
2013-10-04 19:34 ` Steven Rostedt
@ 2013-10-06 14:04 ` tip-bot for Shawn Bohrer
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Shawn Bohrer @ 2013-10-06 14:04 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, mgalbraith, hpa, mingo, peterz, sbohrer, rostedt,
tglx
Commit-ID: 6bfa687c19b7ab8adee03f0d43c197c2945dd869
Gitweb: http://git.kernel.org/tip/6bfa687c19b7ab8adee03f0d43c197c2945dd869
Author: Shawn Bohrer <sbohrer@rgmadvisors.com>
AuthorDate: Fri, 4 Oct 2013 14:24:53 -0500
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 6 Oct 2013 11:28:40 +0200
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>
---
kernel/sched/rt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 01970c8..ceebfba 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)
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-06 14:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-04 19:24 [PATCH] sched/rt: Remove redundant nr_cpus_allowed test Shawn Bohrer
2013-10-04 19:34 ` Steven Rostedt
2013-10-06 14:04 ` [tip:sched/core] " tip-bot for Shawn Bohrer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox