linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valentin Schneider <valentin.schneider@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>,
	mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
	dietmar.eggemann@arm.com, rostedt@goodmis.org,
	bsegall@google.com, mgorman@suse.de, fweisbec@gmail.com,
	tglx@linutronix.de, bristot@redhat.com,
	linux-kernel@vger.kernel.org, joel@joelfernandes.org
Cc: qais.yousef@arm.com, Vincent Guittot <vincent.guittot@linaro.org>
Subject: Re: [PATCH 1/6] sched/fair: remove update of blocked load from newidle_balance
Date: Tue, 09 Feb 2021 13:09:20 +0000	[thread overview]
Message-ID: <jhjv9b1tmkf.mognet@arm.com> (raw)
In-Reply-To: <20210205114830.781-2-vincent.guittot@linaro.org>

On 05/02/21 12:48, Vincent Guittot wrote:
> @@ -10517,16 +10499,11 @@ static void nohz_newidle_balance(struct rq *this_rq)
>           time_before(jiffies, READ_ONCE(nohz.next_blocked)))
>               return;
>

I was wondering whether all the conditions above were still relevant. I
think they are, but this one:

        /* Will wake up very soon. No time for doing anything else*/
        if (this_rq->avg_idle < sysctl_sched_migration_cost)
                return;

should have its comment updated to something like:

        /*
         * Will wake up very soon. Blocked load will be updated
         * periodically, no need to wake an idle CPU.
         */

given kick_ilb() isn't the costliest of things.

> -	raw_spin_unlock(&this_rq->lock);
>       /*
> -	 * This CPU is going to be idle and blocked load of idle CPUs
> -	 * need to be updated. Run the ilb locally as it is a good
> -	 * candidate for ilb instead of waking up another idle CPU.
> -	 * Kick an normal ilb if we failed to do the update.
> +	 * Blocked load of idle CPUs need to be updated.
> +	 * Kick an ILB to update statistics.
>        */
> -	if (!_nohz_idle_balance(this_rq, NOHZ_STATS_KICK, CPU_NEWLY_IDLE))
> -		kick_ilb(NOHZ_STATS_KICK);
> -	raw_spin_lock(&this_rq->lock);

With this change, the return value of _nohz_idle_balance() is no longer
used. This means we could get rid of the tracking of whether it iterated
over all nohz CPUs or not.

> +	kick_ilb(NOHZ_STATS_KICK);
>  }
>
>  #else /* !CONFIG_NO_HZ_COMMON */

  reply	other threads:[~2021-02-09 13:10 UTC|newest]

Thread overview: 20+ 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 [this message]
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
2021-02-05 11:48 ` [PATCH 6/6] sched/fair: reduce the window for duplicated update Vincent Guittot
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=jhjv9b1tmkf.mognet@arm.com \
    --to=valentin.schneider@arm.com \
    --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 \
    --cc=vincent.guittot@linaro.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).