Re: [PATCH v10 00/10] x86: Quiesce text_poke() IPIs

From: Mathieu Desnoyers

Date: Mon Nov 30 2026 - 15:10:33 EST


On 2026-11-30 14:31, Mathieu Desnoyers wrote:
[...]
>
>
> How about the following idea:
>
> Introduce a new vDSO which can be called periodically from NO_HZ userspace
> to note kernel quiescence for that CPU. It would do so by incrementing a
> counter in the rseq per-thread area from userspace. Observing this counter
> increment would allow the kernel to detect that this CPU was running in
> userspace at some point between the two loads of that field from the kernel.
> Those loads from the kernel would happen from remote CPUs. The running thread
> on the NO_HZ CPU would be guaranteed stable by the rq lock.
>
> Let me know if this may work, or if I'm missing the point entirely.

Except my idea is kind of dumb, and Valentin's approach is much better:
let the kernel keep track of this on return to userspace/kernel entry.

Thanks,

Mathieu


--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com