From: Peter Zijlstra <peterz@infradead.org>
To: Tejun Heo <tj@kernel.org>
Cc: David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>,
linux-kernel@vger.kernel.org, sched-ext@lists.linux.dev,
bpf@vger.kernel.org, Wen-Fang Liu <liuwenfang@honor.com>
Subject: Re: sched_ext: Fix SCX_KICK_WAIT to work reliably
Date: Wed, 22 Oct 2025 10:03:46 +0200 [thread overview]
Message-ID: <20251022080346.GH4067720@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20251021210354.89570-3-tj@kernel.org>
On Tue, Oct 21, 2025 at 11:03:54AM -1000, Tejun Heo wrote:
> @@ -5208,12 +5214,11 @@ static void kick_cpus_irq_workfn(struct
>
> if (cpu != cpu_of(this_rq)) {
> /*
> - * Pairs with smp_store_release() issued by this CPU in
> - * switch_class() on the resched path.
> + * Pairs with store_release in put_prev_task_scx().
> *
> - * We busy-wait here to guarantee that no other task can
> - * be scheduled on our core before the target CPU has
> - * entered the resched path.
> + * We busy-wait here to guarantee that the task running
> + * at the time of kicking is no longer running. This can
> + * be used to implement e.g. core scheduling.
> */
> while (smp_load_acquire(wait_pnt_seq) == pseqs[cpu])
> cpu_relax();
You could consider using:
smp_cond_load_acquire(wait_pnt_seq, VAL !+ pseqs[cpu]);
that's the fancy way of doing a spin wait and allows architectures to
optimize (mostly arm64 at this point).
next prev parent reply other threads:[~2025-10-22 8:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 21:03 [PATCHSET sched_ext/for-6.19] sched_ext: Fix SCX_KICK_WAIT reliability Tejun Heo
2025-10-21 21:03 ` sched_ext: Don't kick CPUs running higher classes Tejun Heo
2025-10-21 21:03 ` sched_ext: Fix SCX_KICK_WAIT to work reliably Tejun Heo
2025-10-22 7:43 ` Andrea Righi
2025-10-22 18:37 ` Tejun Heo
2025-10-22 19:25 ` Andrea Righi
2025-10-22 8:03 ` Peter Zijlstra [this message]
2025-10-22 18:38 ` Tejun Heo
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=20251022080346.GH4067720@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=arighi@nvidia.com \
--cc=bpf@vger.kernel.org \
--cc=changwoo@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liuwenfang@honor.com \
--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