[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKfTPtD2hhP4Sx6mxJT=Pzwc3mc3KEK3SCWOxB8CMdLn3QyxCQ@mail.gmail.com>
Date: Mon, 16 Jun 2025 14:33:43 +0200
From: Vincent Guittot <vincent.guittot@...aro.org>
To: Julia Lawall <julia.lawall@...ia.fr>
Cc: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>,
Dietmar Eggemann <dietmar.eggemann@....com>, linux-kernel@...r.kernel.org
Subject: Re: has_idle_core
On Sun, 15 Jun 2025 at 22:26, Julia Lawall <julia.lawall@...ia.fr> wrote:
>
> Hello,
>
> I wonder about the following code in select_idle_cpu:
>
> for_each_cpu_wrap(cpu, cpus, target + 1) {
> if (has_idle_core) {
> i = select_idle_core(p, cpu, cpus, &idle_cpu);
> if ((unsigned int)i < nr_cpumask_bits)
> return i;
>
> } else {
> if (--nr <= 0)
> return -1;
> idle_cpu = __select_idle_cpu(cpu, p);
> if ((unsigned int)idle_cpu < nr_cpumask_bits)
> break;
> }
> }
>
> if (has_idle_core)
> set_idle_cores(target, false);
>
> set/test_idle_cores works at the LLC level. But the mask cpus in
> for_each_cpu_wrap depends on the set of cores on which the task to be
> placed can run. So can't the placement of one task that is pinned to a
> small set of busy cores prevent the search for an idle core for subsequent
> less restricted waking tasks, until the idle cores flag is reset?
Yes, you're right. Now this is probably mitigated by the fact that it
still tries to find an idle cpu and load balance tries to spread tasks
on core
>
> For the moment, this is a purely theoretical question. I don't have a
> concrete example that illustrates the problem.
>
> thanks,
> julia
Powered by blists - more mailing lists