From: Kuba Piecuch <jpiecuch@google.com>
To: Andrea Righi <arighi@nvidia.com>, Kuba Piecuch <jpiecuch@google.com>
Cc: Tejun Heo <tj@kernel.org>, David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>, <sched-ext@lists.linux.dev>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] selftests/sched_ext: Make allowed_cpus idle validation race-free
Date: Sat, 01 Aug 2026 10:35:24 +0000 [thread overview]
Message-ID: <DKDJGWYH2NUN.1OZFGQKJUVFHH@google.com> (raw)
In-Reply-To: <amy-pKcguBtwJQZE@gpd4>
On Fri Jul 31, 2026 at 3:26 PM UTC, Andrea Righi wrote:
> On Fri, Jul 31, 2026 at 11:12:09AM +0000, Kuba Piecuch wrote:
>> Could we check a stronger invariant by also checking that the bit in the idle
>> mask is set if we're running an idle task? We can get the idle cpumask through
>> scx_bpf_get_idle_cpumask() and check bits without clearing them using
>> bpf_cpumask_test_cpu().
>
> I don't think the other direction always holds: an idle CPU can be claimed by
> another BPF idle CPU selection helper, which can clear the idle bit before the
> CPU necessarily stops running the idle task. In that case, observing an idle
> task with a clear idle bit is legitimate.
Right, thanks for pointing that out.
next prev parent reply other threads:[~2026-08-01 10:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 8:59 [PATCHSET v2 sched_ext/for-7.3] sched_ext: Fix idle CPU state initialization and validation Andrea Righi
2026-07-31 8:59 ` [PATCH 1/2] sched_ext: Initialize idle masks before ops.init() Andrea Righi
2026-07-31 10:47 ` Kuba Piecuch
2026-07-31 15:01 ` Andrea Righi
2026-07-31 8:59 ` [PATCH 2/2] selftests/sched_ext: Make allowed_cpus idle validation race-free Andrea Righi
2026-07-31 11:12 ` Kuba Piecuch
2026-07-31 15:26 ` Andrea Righi
2026-08-01 10:35 ` Kuba Piecuch [this message]
2026-07-31 18:23 [PATCHSET v3 sched_ext/for-7.3] sched_ext: Fix idle CPU state initialization and validation Andrea Righi
2026-07-31 18:23 ` [PATCH 2/2] selftests/sched_ext: Make allowed_cpus idle validation race-free Andrea Righi
2026-08-03 6:08 [PATCHSET v4 sched_ext/for-7.3] sched_ext: Fix idle CPU state initialization and validation Andrea Righi
2026-08-03 6:08 ` [PATCH 2/2] selftests/sched_ext: Make allowed_cpus idle validation race-free Andrea Righi
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=DKDJGWYH2NUN.1OZFGQKJUVFHH@google.com \
--to=jpiecuch@google.com \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=void@manifault.com \
/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®