public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Qais Yousef <qyousef@layalina.io>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-kernel@vger.kernel.org,
	Pierre Gondois <Pierre.Gondois@arm.com>
Subject: Re: [PATCH v4 1/2] sched/fair: Check a task has a fitting cpu when updating misfit
Date: Thu, 25 Jan 2024 10:35:25 +0000	[thread overview]
Message-ID: <08334d9d-8a0a-468f-a1db-ce6c19e491f7@arm.com> (raw)
In-Reply-To: <20240124224321.vn4tuwj53wfk6iyk@airbuntu>

On 24/01/2024 22:43, Qais Yousef wrote:
> On 01/23/24 18:07, Dietmar Eggemann wrote:
>> On 22/01/2024 19:02, Qais Yousef wrote:
>>> On 01/22/24 09:59, Dietmar Eggemann wrote:
>>>> On 05/01/2024 23:20, Qais Yousef wrote:
>>>>> From: Qais Yousef <qais.yousef@arm.com>

[...]

>>>> What happen when we hotplug out all CPUs of one CPU capacity value?
>>>> IMHO, we don't call asym_cpu_capacity_scan() with !new_topology
>>>> (partition_sched_domains_locked()).
>>>
>>> Right. I missed that. We can add another intersection check against
>>> cpu_active_mask.
>>>
>>> I am assuming the skipping was done by design, not a bug that needs fixing?
>>> I see for suspend (cpuhp_tasks_frozen) the domains are rebuilt, but not for
>>> hotplug.
>>
>> IMHO, it's by design. We setup asym_cap_list only when new_topology is
>> set (update_topology_flags_workfn() from init_cpu_capacity_callback() or
>> topology_init_cpu_capacity_cppc()). I.e. when the (max) CPU capacity can
>> change.
>> In all the other !new_topology cases we check `has_asym |= sd->flags &
>> SD_ASYM_CPUCAPACITY` and set sched_asym_cpucapacity accordingly in
>> build_sched_domains(). Before we always reset sched_asym_cpucapacity in
>> detach_destroy_domains().
>> But now we would have to keep asym_cap_list in sync with the active CPUs
>> I guess.
> 
> Okay, so you suggest we need to update the code to keep it in sync. Let's see
> first if Vincent is satisfied with this list traversal or we need to go another
> way :-)

Yes, if preventing the 'increase of balance_interval' will cure this
issue as well, then this will be definitely the less invasive fix.

Can you not easily do a 'perf bench sched messaging -g X -l Y' test on
you M1 to get some numbers behind this additional list traversal in
pick_next_task_fair()?

> I think it is worth having this asym_capacity list available. It seemed several
> times we needed it and just a little work is required to make it available for
> potential future users. Even if we don't merge immediately.

I agree. It would give us this ordered (by max CPU capacity) list of
CPUs to iterate over.

[...]

  reply	other threads:[~2024-01-25 10:36 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-05 22:20 [PATCH v4 0/2] sched: Don't trigger misfit if affinity is restricted Qais Yousef
2024-01-05 22:20 ` [PATCH v4 1/2] sched/fair: Check a task has a fitting cpu when updating misfit Qais Yousef
2024-01-22  9:59   ` Dietmar Eggemann
2024-01-22 18:02     ` Qais Yousef
2024-01-23 18:07       ` Dietmar Eggemann
2024-01-24 22:43         ` Qais Yousef
2024-01-25 10:35           ` Dietmar Eggemann [this message]
2024-01-26  0:47             ` Qais Yousef
2024-01-23  8:32     ` Vincent Guittot
2024-01-24 22:46       ` Qais Yousef
2024-01-25 17:44         ` Vincent Guittot
2024-01-26  0:37           ` Qais Yousef
2024-01-23  8:26   ` Vincent Guittot
2024-01-24 22:29     ` Qais Yousef
2024-01-25 17:40       ` Vincent Guittot
2024-01-26  1:46         ` Qais Yousef
2024-01-26 14:08           ` Vincent Guittot
2024-01-28 23:50             ` Qais Yousef
2024-01-29 22:53               ` Qais Yousef
2024-01-30  9:41               ` Vincent Guittot
2024-01-30 23:57                 ` Qais Yousef
2024-01-31 13:55                   ` Vincent Guittot
2024-02-01 22:21                     ` Qais Yousef
2024-02-05 19:49           ` Dietmar Eggemann
2024-02-06 15:06             ` Qais Yousef
2024-02-06 17:17               ` Dietmar Eggemann
2024-02-20 16:07                 ` Qais Yousef
2024-01-23 17:22   ` Vincent Guittot
2024-01-24 22:38     ` Qais Yousef
2024-01-25 17:50       ` Vincent Guittot
2024-01-26  2:07         ` Qais Yousef
2024-01-26 14:15           ` Vincent Guittot
2024-01-28 23:32             ` Qais Yousef
2024-01-05 22:20 ` [PATCH v4 2/2] sched/topology: Sort asym_cap_list in descending order Qais Yousef
2024-01-21  0:10 ` [PATCH v4 0/2] sched: Don't trigger misfit if affinity is restricted Qais Yousef

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=08334d9d-8a0a-468f-a1db-ce6c19e491f7@arm.com \
    --to=dietmar.eggemann@arm.com \
    --cc=Pierre.Gondois@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=qyousef@layalina.io \
    --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