All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Guittot <vincent.guittot@linaro.org>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Joel Fernandes <joel@joelfernandes.org>,
	Qais Yousef <qais.yousef@arm.com>
Subject: Re: [RFC PATCH 5/6] sched/fair: trigger the update of blocked load on newly idle cpu
Date: Tue, 9 Feb 2021 15:22:55 +0100	[thread overview]
Message-ID: <CAKfTPtANm-b+iKU09Rvu1Tu5MBpNAkmzn0FOstURWs4royTMpQ@mail.gmail.com> (raw)
In-Reply-To: <86be4035-9350-6cd2-9859-9444307f9033@arm.com>

On Tue, 9 Feb 2021 at 14:47, Dietmar Eggemann <dietmar.eggemann@arm.com> wrote:
>
> On 05/02/2021 12:48, Vincent Guittot wrote:
> > Instead of waking up a random and already idle CPU, we can take advantage
> > of this_cpu being about to enter idle to run the ILB and update the
> > blocked load.
> >
> > Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> > ---
> >  include/linux/sched/nohz.h |  2 ++
> >  kernel/sched/fair.c        | 11 ++++++++---
> >  kernel/sched/idle.c        |  6 ++++++
> >  3 files changed, 16 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/linux/sched/nohz.h b/include/linux/sched/nohz.h
> > index 6d67e9a5af6b..74cdc4e87310 100644
> > --- a/include/linux/sched/nohz.h
> > +++ b/include/linux/sched/nohz.h
> > @@ -9,8 +9,10 @@
> >  #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
> >  extern void nohz_balance_enter_idle(int cpu);
> >  extern int get_nohz_timer_target(void);
> > +extern void nohz_run_idle_balance(int cpu);
> >  #else
> >  static inline void nohz_balance_enter_idle(int cpu) { }
> > +static inline void nohz_run_idle_balance(int cpu) { }
> >  #endif
>
> (1) Since nohz_run_idle_balance() would be an interface one sched class
> (fair) exports to another (idle) I wonder if kernel/sched/sched.h would
> be the more appropriate include file to export/define it?

Yes probably. I have been influenced by the "nohz" filename but
kernel/sched/sched.h is better

>
> nohz_balance_exit_idle() is exported via kernel/sched/sched.h (used only
> within the scheduler) whereas nohz_balance_enter_idle() is exported via
> include/linux/sched/nohz.h (used in kernel/time/tick-sched.c).
>
> Isn't include/linux/sched/nohz.h the interface between kernel/sched/ and
> kernel/time?
>
> There is one exception already though: calc_load_nohz_remote() defined
> in kernel/sched/loadavg.c and (only) used in kernel/sched/core.c.
>
>
> (2) Is there a need for an extra function nohz_run_idle_balance()?
> do_idle() could call nohz_idle_balance() directly in case in would be
> exported instead.

I didn't want to expose the 2 parameters of nohz_idle_balance in
do_idle() and especially the enum cpu_idle_type but it seems that it
is already available so I can probably call
nohz_idle_balance(cpu_rq(cpu), CPU_IDLE); directly


>
> [...]

  reply	other threads:[~2021-02-09 14:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 11:48 [PATCH 0/6] move update blocked load outside newidle_balance Vincent Guittot
2021-02-05 11:48 ` [PATCH 1/6] sched/fair: remove update of blocked load from newidle_balance Vincent Guittot
2021-02-09 13:09   ` Valentin Schneider
2021-02-09 13:20     ` Vincent Guittot
2021-02-09 13:44   ` Dietmar Eggemann
2021-02-05 11:48 ` [PATCH 2/6] sched/fair: remove unused parameter of update_nohz_stats Vincent Guittot
2021-02-09 13:45   ` Dietmar Eggemann
2021-02-09 17:38     ` Vincent Guittot
2021-02-05 11:48 ` [PATCH 3/6] sched/fair: merge for each idle cpu loop of ILB Vincent Guittot
2021-02-09 13:09   ` Valentin Schneider
2021-02-05 11:48 ` [PATCH 4/6] sched/fair: reorder newidle_balance pulled_task test Vincent Guittot
2021-02-09 13:46   ` Dietmar Eggemann
2021-02-05 11:48 ` [RFC PATCH 5/6] sched/fair: trigger the update of blocked load on newly idle cpu Vincent Guittot
2021-02-09 13:09   ` Valentin Schneider
2021-02-09 13:57     ` Vincent Guittot
2021-02-09 17:25       ` Valentin Schneider
2021-02-09 13:47   ` Dietmar Eggemann
2021-02-09 14:22     ` Vincent Guittot [this message]
2021-02-05 11:48 ` [PATCH 6/6] sched/fair: reduce the window for duplicated update Vincent Guittot
2021-02-05 15:13   ` kernel test robot
2021-02-05 16:13   ` [PATCH 6/6 v2] " Vincent Guittot

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=CAKfTPtANm-b+iKU09Rvu1Tu5MBpNAkmzn0FOstURWs4royTMpQ@mail.gmail.com \
    --to=vincent.guittot@linaro.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=fweisbec@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.