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 <[email protected]>
---
--- 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;
On Sat, May 21, 2011 at 10:19 PM, Hillf Danton <[email protected]> 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 <[email protected]>
Yup, it's true.
Reviewed-by: Yong Zhang <[email protected]>
> ---
>
> --- 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
On Tue, 2011-05-24 at 16:17 +0800, Yong Zhang wrote:
> On Sat, May 21, 2011 at 10:19 PM, Hillf Danton <[email protected]> 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 <[email protected]>
>
> Yup, it's true.
(could whack the else while there)
> Reviewed-by: Yong Zhang <[email protected]>
>
> > ---
> >
> > --- 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;
> >
>
>
>
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 <[email protected]>
> ---
Acked-by: Steven Rostedt <[email protected]>
-- Steve
On Tue, 24 May 2011, Hillf Danton wrote:
> On Tue, May 24, 2011 at 7:53 PM, Mike Galbraith <[email protected]> wrote:
> > On Tue, 2011-05-24 at 16:17 +0800, Yong Zhang wrote:
> >> On Sat, May 21, 2011 at 10:19 PM, Hillf Danton <[email protected]> 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 <[email protected]>
> >>
> >> 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 <[email protected]> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
On Tue, May 24, 2011 at 7:53 PM, Mike Galbraith <[email protected]> wrote:
> On Tue, 2011-05-24 at 16:17 +0800, Yong Zhang wrote:
>> On Sat, May 21, 2011 at 10:19 PM, Hillf Danton <[email protected]> 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 <[email protected]>
>>
>> Yup, it's true.
>
> (could whack the else while there)
>
Where is it, Mike?
thanks
Hillf
On Tue, May 24, 2011 at 10:16 PM, Jesper Juhl <[email protected]> wrote:
> On Tue, 24 May 2011, Hillf Danton wrote:
>
>> On Tue, May 24, 2011 at 7:53 PM, Mike Galbraith <[email protected]> wrote:
>> > On Tue, 2011-05-24 at 16:17 +0800, Yong Zhang wrote:
>> >> On Sat, May 21, 2011 at 10:19 PM, Hillf Danton <[email protected]> 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 <[email protected]>
>> >>
>> >> 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 <[email protected]> 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