Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1587034

Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too

From Pavan Kondeti <pkondeti@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too
Date 2017-02-23 18:30 +0100
Message-ID <te5nj-4nQ-9@gated-at.bofh.it> (permalink)
References (2 earlier) <tdYYy-8q5-11@gated-at.bofh.it> <te265-23e-9@gated-at.bofh.it> <te3lv-323-3@gated-at.bofh.it> <te3Ox-3bZ-23@gated-at.bofh.it> <te4AW-3Pf-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Feb 23, 2017 at 10:07 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Thu, Feb 23, 2017 at 04:25:33PM +0100, Peter Zijlstra wrote:
>>
>> Ah, I read your question wrong. Yes I think you're right, we now loose
>> the pull when the last RT task goes away.
>>
>> Hmm.. how to fix that nicely..
>
> Something like so perhaps? This would make a pull happen when the last
> RT task on this CPU goes away.
>
> Steve?
>
> ---
> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
> index 9f3e40226dec..283d591078b0 100644
> --- a/kernel/sched/rt.c
> +++ b/kernel/sched/rt.c
> @@ -1336,6 +1336,9 @@ static void dequeue_task_rt(struct rq *rq, struct task_struct *p, int flags)
>         dequeue_rt_entity(rt_se, flags);
>
>         dequeue_pushable_task(rq, p);
> +
> +       if (!rq->rt.rt_nr_running)
> +               queue_pull_task(rq);
>  }
>
>  /*

The next balance_callback() is not called until the context switch is
completed. So we potentially pick a lower class task before the pull
happens. Would it be wrong to call pull_rt_task() directly instead of
queuing the callback.


-- 
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too Pavan Kondeti <pkondeti@codeaurora.org> - 2017-02-23 11:40 +0100
  Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too Peter Zijlstra <peterz@infradead.org> - 2017-02-23 15:00 +0100
    Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too Pavan Kondeti <pkondeti@codeaurora.org> - 2017-02-23 16:20 +0100
      Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too Peter Zijlstra <peterz@infradead.org> - 2017-02-23 16:50 +0100
        Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too Peter Zijlstra <peterz@infradead.org> - 2017-02-23 17:40 +0100
          Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too Pavan Kondeti <pkondeti@codeaurora.org> - 2017-02-23 18:30 +0100
            Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too Peter Zijlstra <peterz@infradead.org> - 2017-02-23 18:50 +0100
              Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too Peter Zijlstra <peterz@infradead.org> - 2017-02-23 19:00 +0100
                Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too Steven Rostedt <rostedt@goodmis.org> - 2017-02-27 19:20 +0100

csiph-web