mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valentin Schneider <valentin.schneider@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Morten Rasmussen <Morten.Rasmussen@arm.com>
Subject: Re: [PATCH v2 2/3] sched/fair: trigger asym_packing during idle load balance
Date: Tue, 18 Dec 2018 12:00:16 +0000	[thread overview]
Message-ID: <f02b1bc4-c88f-398b-1c38-779f22bd4b34@arm.com> (raw)
In-Reply-To: <CAKfTPtDKy07v6YUgz1fegTtsg_K-AcbU+t7y5wFQaTu0TK+_fA@mail.gmail.com>

On 18/12/2018 08:17, Vincent Guittot wrote:
[...]
>> That change looks fine. However, you're mentioning newidle load_balance()
>> not being triggered - you'd want to set root_domain->overload for any
>> newidle pull to happen, probably with something like this:
> 
> It's not needed in this case because the dst cpu is already the target
> cpu and the migration will happen during this idle load balance.
> Setting root_domain->overload is useful only if you want another cpu
> to pull the task during another coming load_balance (newly or normal
> idle ones) which is not the case here.
> 

Right, I got the check wrong. The thing is, if you want to go through a
newidle balance, you need to have that overload flag raised beforehand.

I was about to draw a diagram but I kinda already did in the log of
757ffdd705ee ("sched/fair: Set rq->rd->overload when misfit").

So you would first need to raise the flag, e.g. when updating the lb stats
on a low-priority CPU, and when a higher-priority CPU goes newly idle,
the flag is raised, gates to idle_balance() are opened, and a newidle pull
from low-priority to high-priority can happen.

>>
>> -----8<-----
>> @@ -8398,6 +8408,9 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd
>>                 sg = sg->next;
>>         } while (sg != env->sd->groups);
>>
>> +       if (check_asym_packing(env, sds))
>> +               sg_status |= SG_OVERLOAD;
>> +
>>  #ifdef CONFIG_NO_HZ_COMMON
>>         if ((env->flags & LBF_NOHZ_AGAIN) &&
>>             cpumask_subset(nohz.idle_cpus_mask, sched_domain_span(env->sd))) {
>> ----->8-----
>>
>> It's similar to what is done for misfit, although that's yet another
>> 'twisted' use of that flag which we might want to rename (I suggested
>> something like 'need_idle_balance' a while back but it wasn't really
>> popular).

  reply	other threads:[~2018-12-18 12:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 16:01 [PATCH v2 0/3] sched/fair: some fixes for asym_packing Vincent Guittot
2018-12-14 16:01 ` [PATCH v2 1/3] sched/fair: fix rounding issue for asym packing Vincent Guittot
2018-12-18 17:32   ` Valentin Schneider
2018-12-19  8:32     ` Vincent Guittot
2018-12-19 11:58       ` Valentin Schneider
2018-12-19 13:39         ` Vincent Guittot
2018-12-19 14:59           ` Valentin Schneider
2018-12-19 15:05             ` Vincent Guittot
2018-12-19 15:11               ` Valentin Schneider
2018-12-19 15:20                 ` Vincent Guittot
2018-12-19 15:30                   ` Valentin Schneider
2018-12-19 15:54                     ` Vincent Guittot
2018-12-14 16:01 ` [PATCH v2 2/3] sched/fair: trigger asym_packing during idle load balance Vincent Guittot
2018-12-17 16:59   ` Valentin Schneider
2018-12-18  8:17     ` Vincent Guittot
2018-12-18 12:00       ` Valentin Schneider [this message]
2018-12-14 16:01 ` [PATCH v2 3/3] sched/fair: fix unnecessary increase of balance interval Vincent Guittot
2018-12-17 16:56   ` Valentin Schneider
2018-12-18  9:32     ` Vincent Guittot
2018-12-18 11:46       ` Valentin Schneider
2018-12-18 13:23         ` Vincent Guittot
2018-12-18 14:09           ` Valentin Schneider
2018-12-19  8:27             ` Vincent Guittot
2018-12-19 11:16               ` Valentin Schneider
2018-12-19 13:29                 ` Vincent Guittot
2018-12-19 15:54                   ` Valentin Schneider
2018-12-19 16:54                     ` 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=f02b1bc4-c88f-398b-1c38-779f22bd4b34@arm.com \
    --to=valentin.schneider@arm.com \
    --cc=Morten.Rasmussen@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --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

all inboxes | Powered by JetHome®