All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Guittot <vincent.guittot@linaro.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Brendan Jackman <brendan.jackman@arm.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Morten Rasmussen <morten.rasmussen@arm.com>
Subject: Re: [PATCH v2 1/2] sched: force update of blocked load of idle cpus
Date: Thu, 21 Dec 2017 11:01:15 +0100	[thread overview]
Message-ID: <CAKfTPtBt300QnodhodrzbN5M0Ka8TqjC5G6a_rAVOUH43_1yYA@mail.gmail.com> (raw)
In-Reply-To: <CAKfTPtC0Seb3MDDSv-ZASLUfvrTkZta_jSDR9DVM4QMW_0ohPg@mail.gmail.com>

On 20 December 2017 at 15:27, Vincent Guittot
<vincent.guittot@linaro.org> wrote:
> On 20 December 2017 at 15:09, Peter Zijlstra <peterz@infradead.org> wrote:
>> On Fri, Dec 01, 2017 at 06:01:56PM +0000, Brendan Jackman wrote:
>>
>>> @@ -9210,7 +9256,15 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
>>>                       cpu_load_update_idle(rq);
>>>                       rq_unlock_irq(rq, &rf);
>>>
>>> -                     rebalance_domains(rq, CPU_IDLE);
>>> +                     update_blocked_averages(balance_cpu);
>>> +                     /*
>>> +                      * This idle load balance softirq may have been
>>> +                      * triggered only to update the blocked load and shares
>>> +                      * of idle CPUs (which we have just done for
>>> +                      * balance_cpu). In that case skip the actual balance.
>>> +                      */
>>> +                     if (!in_nohz_stats_kick(this_cpu))
>>> +                             rebalance_domains(rq, idle);
>>>               }
>>>
>>>               if (time_after(next_balance, rq->next_balance)) {
>>
>>> @@ -9336,7 +9396,12 @@ static __latent_entropy void run_rebalance_domains(struct softirq_action *h)
>>>        * and abort nohz_idle_balance altogether if we pull some load.
>>>        */
>>>       nohz_idle_balance(this_rq, idle);
>>> -     rebalance_domains(this_rq, idle);
>>> +     update_blocked_averages(this_rq->cpu);
>>> +     if (!in_nohz_stats_kick(this_rq->cpu))
>>> +             rebalance_domains(this_rq, idle);
>>> +#ifdef CONFIG_NO_HZ_COMMON
>>> +     clear_bit(NOHZ_STATS_KICK, nohz_flags(this_rq->cpu));
>>> +#endif
>>>  }
>>>
>>>  /*
>>
>> You're doing the same thing to both (all) callsites of
>> rebalance_domains(), does that not suggest doing it inside and leaving
>> update_blocked_averages() where it is?
>
> The goal of moving update_blocked_averages() outside rebalance_domains
> is to not add a new parameter or use a special  cpu_idle_type value in
> rebalance_domains parameters in order to abort the rebalance sequence
> just after updating blocked load

Peter,
Is the reason above reasonable or you prefer update_blocked_averages
to stay in rebalance_domains ?

>
>>
>>

  reply	other threads:[~2017-12-21 10:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 18:01 [PATCH v2 0/2] sched/fair: remote load updates for idle CPUs Brendan Jackman
2017-12-01 18:01 ` [PATCH v2 1/2] sched: force update of blocked load of idle cpus Brendan Jackman
2017-12-20 14:03   ` Peter Zijlstra
2017-12-20 14:23     ` Vincent Guittot
2017-12-20 15:01       ` Peter Zijlstra
2017-12-20 15:05         ` Peter Zijlstra
2017-12-21  7:59         ` Vincent Guittot
2017-12-20 14:09   ` Peter Zijlstra
2017-12-20 14:27     ` Vincent Guittot
2017-12-21 10:01       ` Vincent Guittot [this message]
2017-12-01 18:01 ` [PATCH v2 2/2] sched/fair: Update blocked load from newly idle balance Brendan Jackman
2017-12-20 14:22   ` Peter Zijlstra
2017-12-21  9:19     ` Dietmar Eggemann

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=CAKfTPtBt300QnodhodrzbN5M0Ka8TqjC5G6a_rAVOUH43_1yYA@mail.gmail.com \
    --to=vincent.guittot@linaro.org \
    --cc=brendan.jackman@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=morten.rasmussen@arm.com \
    --cc=peterz@infradead.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 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.