* [PATCH] sched: remove noop in next_prio()
@ 2011-05-21 14:19 Hillf Danton
2011-05-24 8:17 ` Yong Zhang
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Hillf Danton @ 2011-05-21 14:19 UTC (permalink / raw)
To: LKML
Cc: Ingo Molnar, Peter Zijlstra, Steven Rostedt, Mike Galbraith,
Yong Zhang
When computing the next priority for a given run-queue, the check for
RT priority of the task determined by the pick_next_highest_task_rt()
function could be removed, since only RT task is returned by the
function.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
---
--- a/kernel/sched_rt.c 2011-04-27 11:48:50.000000000 +0800
+++ b/kernel/sched_rt.c 2011-05-21 22:10:34.000000000 +0800
@@ -670,7 +670,7 @@ static inline int next_prio(struct rq *r
{
struct task_struct *next = pick_next_highest_task_rt(rq, rq->cpu);
- if (next && rt_prio(next->prio))
+ if (next)
return next->prio;
else
return MAX_RT_PRIO;
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] sched: remove noop in next_prio() 2011-05-21 14:19 [PATCH] sched: remove noop in next_prio() Hillf Danton @ 2011-05-24 8:17 ` Yong Zhang 2011-05-24 11:53 ` Mike Galbraith 2011-05-24 13:09 ` Steven Rostedt 2011-08-14 15:59 ` [tip:sched/core] sched: Remove " tip-bot for Hillf Danton 2 siblings, 1 reply; 8+ messages in thread From: Yong Zhang @ 2011-05-24 8:17 UTC (permalink / raw) To: Hillf Danton Cc: LKML, Ingo Molnar, Peter Zijlstra, Steven Rostedt, Mike Galbraith On Sat, May 21, 2011 at 10:19 PM, Hillf Danton <dhillf@gmail.com> wrote: > When computing the next priority for a given run-queue, the check for > RT priority of the task determined by the pick_next_highest_task_rt() > function could be removed, since only RT task is returned by the > function. > > Signed-off-by: Hillf Danton <dhillf@gmail.com> Yup, it's true. Reviewed-by: Yong Zhang <yong.zhang0@gmail.com> > --- > > --- a/kernel/sched_rt.c 2011-04-27 11:48:50.000000000 +0800 > +++ b/kernel/sched_rt.c 2011-05-21 22:10:34.000000000 +0800 > @@ -670,7 +670,7 @@ static inline int next_prio(struct rq *r > { > struct task_struct *next = pick_next_highest_task_rt(rq, rq->cpu); > > - if (next && rt_prio(next->prio)) > + if (next) > return next->prio; > else > return MAX_RT_PRIO; > -- Only stand for myself ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sched: remove noop in next_prio() 2011-05-24 8:17 ` Yong Zhang @ 2011-05-24 11:53 ` Mike Galbraith 2011-05-24 14:20 ` Hillf Danton 0 siblings, 1 reply; 8+ messages in thread From: Mike Galbraith @ 2011-05-24 11:53 UTC (permalink / raw) To: Yong Zhang Cc: Hillf Danton, LKML, Ingo Molnar, Peter Zijlstra, Steven Rostedt On Tue, 2011-05-24 at 16:17 +0800, Yong Zhang wrote: > On Sat, May 21, 2011 at 10:19 PM, Hillf Danton <dhillf@gmail.com> wrote: > > When computing the next priority for a given run-queue, the check for > > RT priority of the task determined by the pick_next_highest_task_rt() > > function could be removed, since only RT task is returned by the > > function. > > > > Signed-off-by: Hillf Danton <dhillf@gmail.com> > > Yup, it's true. (could whack the else while there) > Reviewed-by: Yong Zhang <yong.zhang0@gmail.com> > > > --- > > > > --- a/kernel/sched_rt.c 2011-04-27 11:48:50.000000000 +0800 > > +++ b/kernel/sched_rt.c 2011-05-21 22:10:34.000000000 +0800 > > @@ -670,7 +670,7 @@ static inline int next_prio(struct rq *r > > { > > struct task_struct *next = pick_next_highest_task_rt(rq, rq->cpu); > > > > - if (next && rt_prio(next->prio)) > > + if (next) > > return next->prio; > > else > > return MAX_RT_PRIO; > > > > > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sched: remove noop in next_prio() 2011-05-24 11:53 ` Mike Galbraith @ 2011-05-24 14:20 ` Hillf Danton 2011-05-24 14:16 ` Jesper Juhl 0 siblings, 1 reply; 8+ messages in thread From: Hillf Danton @ 2011-05-24 14:20 UTC (permalink / raw) To: Mike Galbraith Cc: Yong Zhang, LKML, Ingo Molnar, Peter Zijlstra, Steven Rostedt On Tue, May 24, 2011 at 7:53 PM, Mike Galbraith <efault@gmx.de> wrote: > On Tue, 2011-05-24 at 16:17 +0800, Yong Zhang wrote: >> On Sat, May 21, 2011 at 10:19 PM, Hillf Danton <dhillf@gmail.com> wrote: >> > When computing the next priority for a given run-queue, the check for >> > RT priority of the task determined by the pick_next_highest_task_rt() >> > function could be removed, since only RT task is returned by the >> > function. >> > >> > Signed-off-by: Hillf Danton <dhillf@gmail.com> >> >> Yup, it's true. > > (could whack the else while there) > Where is it, Mike? thanks Hillf ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sched: remove noop in next_prio() 2011-05-24 14:20 ` Hillf Danton @ 2011-05-24 14:16 ` Jesper Juhl 2011-05-24 14:26 ` Hillf Danton 0 siblings, 1 reply; 8+ messages in thread From: Jesper Juhl @ 2011-05-24 14:16 UTC (permalink / raw) To: Hillf Danton Cc: Mike Galbraith, Yong Zhang, LKML, Ingo Molnar, Peter Zijlstra, Steven Rostedt On Tue, 24 May 2011, Hillf Danton wrote: > On Tue, May 24, 2011 at 7:53 PM, Mike Galbraith <efault@gmx.de> wrote: > > On Tue, 2011-05-24 at 16:17 +0800, Yong Zhang wrote: > >> On Sat, May 21, 2011 at 10:19 PM, Hillf Danton <dhillf@gmail.com> wrote: > >> > When computing the next priority for a given run-queue, the check for > >> > RT priority of the task determined by the pick_next_highest_task_rt() > >> > function could be removed, since only RT task is returned by the > >> > function. > >> > > >> > Signed-off-by: Hillf Danton <dhillf@gmail.com> > >> > >> Yup, it's true. > > > > (could whack the else while there) > > > > Where is it, Mike? > - if (next && rt_prio(next->prio)) + if (next) return next->prio; - else - return MAX_RT_PRIO; + return MAX_RT_PRIO; -- Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sched: remove noop in next_prio() 2011-05-24 14:16 ` Jesper Juhl @ 2011-05-24 14:26 ` Hillf Danton 0 siblings, 0 replies; 8+ messages in thread From: Hillf Danton @ 2011-05-24 14:26 UTC (permalink / raw) To: Jesper Juhl Cc: Mike Galbraith, Yong Zhang, LKML, Ingo Molnar, Peter Zijlstra, Steven Rostedt On Tue, May 24, 2011 at 10:16 PM, Jesper Juhl <jj@chaosbits.net> wrote: > On Tue, 24 May 2011, Hillf Danton wrote: > >> On Tue, May 24, 2011 at 7:53 PM, Mike Galbraith <efault@gmx.de> wrote: >> > On Tue, 2011-05-24 at 16:17 +0800, Yong Zhang wrote: >> >> On Sat, May 21, 2011 at 10:19 PM, Hillf Danton <dhillf@gmail.com> wrote: >> >> > When computing the next priority for a given run-queue, the check for >> >> > RT priority of the task determined by the pick_next_highest_task_rt() >> >> > function could be removed, since only RT task is returned by the >> >> > function. >> >> > >> >> > Signed-off-by: Hillf Danton <dhillf@gmail.com> >> >> >> >> Yup, it's true. >> > >> > (could whack the else while there) >> > >> >> Where is it, Mike? >> > > > - if (next && rt_prio(next->prio)) > + if (next) > return next->prio; > - else > - return MAX_RT_PRIO; > + return MAX_RT_PRIO; > > > > -- > Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/ > Don't top-post http://www.catb.org/jargon/html/T/top-post.html > Plain text mails only, please. > > Very cool, thank you:) Hillf ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] sched: remove noop in next_prio() 2011-05-21 14:19 [PATCH] sched: remove noop in next_prio() Hillf Danton 2011-05-24 8:17 ` Yong Zhang @ 2011-05-24 13:09 ` Steven Rostedt 2011-08-14 15:59 ` [tip:sched/core] sched: Remove " tip-bot for Hillf Danton 2 siblings, 0 replies; 8+ messages in thread From: Steven Rostedt @ 2011-05-24 13:09 UTC (permalink / raw) To: Hillf Danton Cc: LKML, Ingo Molnar, Peter Zijlstra, Mike Galbraith, Yong Zhang On Sat, 2011-05-21 at 22:19 +0800, Hillf Danton wrote: > When computing the next priority for a given run-queue, the check for > RT priority of the task determined by the pick_next_highest_task_rt() > function could be removed, since only RT task is returned by the > function. > > Signed-off-by: Hillf Danton <dhillf@gmail.com> > --- Acked-by: Steven Rostedt <rostedt@goodmis.org> -- Steve ^ permalink raw reply [flat|nested] 8+ messages in thread
* [tip:sched/core] sched: Remove noop in next_prio() 2011-05-21 14:19 [PATCH] sched: remove noop in next_prio() Hillf Danton 2011-05-24 8:17 ` Yong Zhang 2011-05-24 13:09 ` Steven Rostedt @ 2011-08-14 15:59 ` tip-bot for Hillf Danton 2 siblings, 0 replies; 8+ messages in thread From: tip-bot for Hillf Danton @ 2011-08-14 15:59 UTC (permalink / raw) To: linux-tip-commits Cc: linux-kernel, hpa, mingo, a.p.zijlstra, dhillf, rostedt, tglx, yong.zhang0, mingo Commit-ID: 67d955383ab2ef8866c494c14156a4f3d29e441c Gitweb: http://git.kernel.org/tip/67d955383ab2ef8866c494c14156a4f3d29e441c Author: Hillf Danton <dhillf@gmail.com> AuthorDate: Thu, 16 Jun 2011 21:55:18 -0400 Committer: Ingo Molnar <mingo@elte.hu> CommitDate: Sun, 14 Aug 2011 12:00:45 +0200 sched: Remove noop in next_prio() When computing the next priority for a given run-queue, the check for RT priority of the task determined by the pick_next_highest_task_rt() function could be removed, since only RT tasks are returned by the function. Reviewed-by: Yong Zhang <yong.zhang0@gmail.com> Signed-off-by: Hillf Danton <dhillf@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/BANLkTimxmWiof9s5AvS3v_0X+sMiE=0x5g@mail.gmail.com Signed-off-by: Ingo Molnar <mingo@elte.hu> --- kernel/sched_rt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 97540f0..e2698c0 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c @@ -704,7 +704,7 @@ static inline int next_prio(struct rq *rq) { struct task_struct *next = pick_next_highest_task_rt(rq, rq->cpu); - if (next && rt_prio(next->prio)) + if (next) return next->prio; else return MAX_RT_PRIO; ^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-08-14 15:59 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-05-21 14:19 [PATCH] sched: remove noop in next_prio() Hillf Danton 2011-05-24 8:17 ` Yong Zhang 2011-05-24 11:53 ` Mike Galbraith 2011-05-24 14:20 ` Hillf Danton 2011-05-24 14:16 ` Jesper Juhl 2011-05-24 14:26 ` Hillf Danton 2011-05-24 13:09 ` Steven Rostedt 2011-08-14 15:59 ` [tip:sched/core] sched: Remove " tip-bot for Hillf Danton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox