linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavan Kondeti <pkondeti@codeaurora.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Pavan Kondeti <pkondeti@codeaurora.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] sched: Optimize pick_next_task for idle_sched_class too
Date: Thu, 23 Feb 2017 22:59:15 +0530	[thread overview]
Message-ID: <CAEU1=PnoHKiBQyk7ArRbci4BFokhyr-9aazSHTMm9YbW8PHrQQ@mail.gmail.com> (raw)
In-Reply-To: <20170223163737.GW6536@twins.programming.kicks-ass.net>

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

  reply	other threads:[~2017-02-23 17:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-19 15:17 [PATCH] sched: Optimize pick_next_task for idle_sched_class too Steven Rostedt
2017-01-19 17:44 ` Peter Zijlstra
2017-01-20 16:14   ` Steven Rostedt
2017-01-20 16:16     ` Steven Rostedt
2017-01-20 16:52     ` Peter Zijlstra
2017-01-30 11:54   ` [tip:sched/core] sched/core: Optimize pick_next_task() for idle_sched_class tip-bot for Peter Zijlstra
2017-02-23 10:34   ` [PATCH] sched: Optimize pick_next_task for idle_sched_class too Pavan Kondeti
2017-02-23 13:54     ` Peter Zijlstra
2017-02-23 15:15       ` Pavan Kondeti
2017-02-23 15:25         ` Peter Zijlstra
2017-02-23 16:37           ` Peter Zijlstra
2017-02-23 17:29             ` Pavan Kondeti [this message]
2017-02-23 17:45               ` Peter Zijlstra
2017-02-23 17:54                 ` Peter Zijlstra
2017-02-27 17:54                   ` Steven Rostedt
2017-03-01 15:53         ` Steven Rostedt
2017-03-01 16:03           ` Peter Zijlstra
2017-03-01 16:19             ` Steven Rostedt
2017-03-01 16:22               ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEU1=PnoHKiBQyk7ArRbci4BFokhyr-9aazSHTMm9YbW8PHrQQ@mail.gmail.com' \
    --to=pkondeti@codeaurora.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).