From: Julia Lawall <julia.lawall@inria.fr>
To: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
linux-kernel@vger.kernel.org
Subject: has_idle_core
Date: Sun, 15 Jun 2025 22:26:17 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2506152216150.3463@hadrien> (raw)
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?
For the moment, this is a purely theoretical question. I don't have a
concrete example that illustrates the problem.
thanks,
julia
next reply other threads:[~2025-06-15 20:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-15 20:26 Julia Lawall [this message]
2025-06-16 12:33 ` has_idle_core 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=alpine.DEB.2.22.394.2506152216150.3463@hadrien \
--to=julia.lawall@inria.fr \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--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®