From: Catalin Marinas <catalin.marinas@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Christoph Lameter (Ampere)" <cl@gentwo.org>,
Ankur Arora <ankur.a.arora@oracle.com>,
Haris Okanovic <harisokn@amazon.com>,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
bpf@vger.kernel.org, arnd@arndb.de, will@kernel.org,
akpm@linux-foundation.org, mark.rutland@arm.com, ast@kernel.org,
rafael@kernel.org, daniel.lezcano@linaro.org, memxor@gmail.com,
zhenglifeng1@huawei.com, xueshuai@linux.alibaba.com,
rdunlap@infradead.org, david.laight.linux@gmail.com,
broonie@kernel.org, joao.m.martins@oracle.com,
boris.ostrovsky@oracle.com, konrad.wilk@oracle.com,
ashok.bhat@arm.com
Subject: Re: [PATCH v15 12/16] cpuidle/poll_state: Wait for need-resched via tif_need_resched_relaxed_wait()
Date: Wed, 14 Oct 2026 16:23:20 +0100 [thread overview]
Message-ID: <as-eaNfjOAUnfvVF@arm.com> (raw)
In-Reply-To: <20261014130306.GK2009045@noisy.programming.kicks-ass.net>
On Wed, Oct 14, 2026 at 03:03:06PM +0200, Peter Zijlstra wrote:
> On Wed, Oct 14, 2026 at 10:00:18AM +0100, Catalin Marinas wrote:
> > It
> > would also be nice to get some acks from the atomic infrastructure
> > maintainers.
>
> That'd be Mark and me I suppose. I don't see anything substantial
> happening, just plumbing the new function.
Thanks!
> Now, I really rather dislike timeout based schemes, but given we have
> users, I suppose this does improve things. We should however be weary of
> new ones I suppose.
There's some arm64 precedent in commit ebababcd0372 ("rqspinlock:
Hardcode cond_acquire loops for arm64"). This one went in without any of
the arm64 maintainers' ack and we've since been trying to come up with a
generic interface instead of reverting it. It was fixing a bug where
arm64 smp_cond_load_acquire() does not evaluate cond_expr unless the
pointer is also written by another CPU. Arguably the bug was in the
rqspinlock code for not using a plain cpu_relax() loop.
Anyway, we had several incarnations of this series, some with a default
timeout but others objected to it (Arnd and Rafael IIRC), hence the
proposal here that pleased most people (not all though ;)).
--
Catalin
next prev parent reply other threads:[~2026-10-14 15:23 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 20:22 [PATCH v15 00/16] barrier: Add smp_cond_load_{relaxed,acquire}_timeout() Ankur Arora
2026-08-31 20:22 ` [PATCH v15 01/16] asm-generic: barrier: Add smp_cond_load_relaxed_timeout() Ankur Arora
2026-08-31 21:50 ` sashiko-bot
2026-08-31 20:22 ` [PATCH v15 02/16] arm64: barrier: Support smp_cond_load_relaxed_timeout() Ankur Arora
2026-08-31 21:59 ` sashiko-bot
2026-09-01 3:55 ` Ankur Arora
2026-08-31 20:22 ` [PATCH v15 03/16] arm64/delay: move, fixup usecs_to_cycles() Ankur Arora
2026-08-31 22:06 ` sashiko-bot
2026-08-31 20:22 ` [PATCH v15 04/16] arm64: support WFET in smp_cond_load_relaxed_timeout() Ankur Arora
2026-08-31 21:16 ` bot+bpf-ci
2026-08-31 22:19 ` sashiko-bot
2026-08-31 20:22 ` [PATCH v15 05/16] arm64: rqspinlock: Remove private copy of smp_cond_load_acquire_timewait() Ankur Arora
2026-08-31 20:22 ` [PATCH v15 06/16] asm-generic: barrier: Add smp_cond_load_acquire_timeout() Ankur Arora
2026-08-31 21:17 ` bot+bpf-ci
2026-08-31 22:36 ` sashiko-bot
2026-08-31 20:22 ` [PATCH v15 07/16] atomic: Add atomic_cond_read_*_timeout() Ankur Arora
2026-08-31 21:16 ` bot+bpf-ci
2026-08-31 22:47 ` sashiko-bot
2026-08-31 20:22 ` [PATCH v15 08/16] locking/atomic: scripts: build atomic_long_cond_read_*_timeout() Ankur Arora
2026-08-31 20:22 ` [PATCH v15 09/16] bpf/rqspinlock: switch check_timeout() to a clock interface Ankur Arora
2026-08-31 21:16 ` bot+bpf-ci
2026-08-31 20:22 ` [PATCH v15 10/16] bpf/rqspinlock: Use smp_cond_load_acquire_timeout() Ankur Arora
2026-08-31 21:31 ` bot+bpf-ci
2026-08-31 20:22 ` [PATCH v15 11/16] sched: add need-resched timed wait interface Ankur Arora
2026-08-31 20:22 ` [PATCH v15 12/16] cpuidle/poll_state: Wait for need-resched via tif_need_resched_relaxed_wait() Ankur Arora
2026-08-31 23:20 ` sashiko-bot
2026-09-01 4:46 ` Ankur Arora
2026-09-10 23:04 ` Haris Okanovic
2026-09-11 7:13 ` Ankur Arora
2026-09-21 17:47 ` Christoph Lameter (Ampere)
2026-10-14 9:00 ` Catalin Marinas
2026-10-14 13:03 ` Peter Zijlstra
2026-10-14 15:23 ` Catalin Marinas [this message]
2026-08-31 20:22 ` [PATCH v15 13/16] arm64/delay: enable testing smp_cond_load_relaxed_timeout() Ankur Arora
2026-08-31 21:16 ` bot+bpf-ci
2026-08-31 23:28 ` sashiko-bot
2026-09-01 4:53 ` Ankur Arora
2026-08-31 20:22 ` [PATCH v15 14/16] barrier: add tests for smp_cond_load_*_timeout() Ankur Arora
2026-08-31 21:17 ` bot+bpf-ci
2026-09-10 23:04 ` Haris Okanovic
2026-08-31 20:22 ` [PATCH v15 15/16] barrier: timeout validity checks for smp_cond_load_relaxed_timeout() Ankur Arora
2026-08-31 21:16 ` bot+bpf-ci
2026-09-10 23:04 ` Haris Okanovic
2026-08-31 20:22 ` [PATCH v15 16/16] barrier: timeout validity checks for smp_cond_load_acquire_timeout() Ankur Arora
2026-09-10 23:04 ` Haris Okanovic
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=as-eaNfjOAUnfvVF@arm.com \
--to=catalin.marinas@arm.com \
--cc=akpm@linux-foundation.org \
--cc=ankur.a.arora@oracle.com \
--cc=arnd@arndb.de \
--cc=ashok.bhat@arm.com \
--cc=ast@kernel.org \
--cc=boris.ostrovsky@oracle.com \
--cc=bpf@vger.kernel.org \
--cc=broonie@kernel.org \
--cc=cl@gentwo.org \
--cc=daniel.lezcano@linaro.org \
--cc=david.laight.linux@gmail.com \
--cc=harisokn@amazon.com \
--cc=joao.m.martins@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=memxor@gmail.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=will@kernel.org \
--cc=xueshuai@linux.alibaba.com \
--cc=zhenglifeng1@huawei.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