[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3440e3e1-0d0c-4c1e-9cc2-68843e9dd50f@efficios.com>
Date: Tue, 9 Sep 2025 09:18:23 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Thomas Gleixner <tglx@...utronix.de>, LKML <linux-kernel@...r.kernel.org>
Cc: Michael Jeanson <mjeanson@...icios.com>, Jens Axboe <axboe@...nel.dk>,
Peter Zijlstra <peterz@...radead.org>, "Paul E. McKenney"
<paulmck@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
Paolo Bonzini <pbonzini@...hat.com>, Sean Christopherson
<seanjc@...gle.com>, Wei Liu <wei.liu@...nel.org>,
Dexuan Cui <decui@...rosoft.com>, x86@...nel.org,
Arnd Bergmann <arnd@...db.de>, Heiko Carstens <hca@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>, Huacai Chen <chenhuacai@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>
Subject: Re: [patch V4 06/36] rseq: Simplify the event notification
On 2025-09-08 17:31, Thomas Gleixner wrote:
> Since commit 0190e4198e47 ("rseq: Deprecate RSEQ_CS_FLAG_NO_RESTART_ON_*
> flags") the bits in task::rseq_event_mask are meaningless and just extra
> work in terms of setting them individually.
>
> Aside of that the only relevant point where an event has to be raised is
> context switch. Neither the CPU nor MM CID can change without going through
> a context switch.
>
> Collapse them all into a single boolean which simplifies the code a lot and
> remove the pointless invocations which have been sprinkled all over the
> place for no value.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> Cc: "Paul E. McKenney" <paulmck@...nel.org>
> Cc: Boqun Feng <boqun.feng@...il.com>
>
> ---
> V2: Reduce it to the sched switch event.
> ---
> fs/exec.c | 2 -
> include/linux/rseq.h | 66 +++++++++-------------------------------------
> include/linux/sched.h | 10 +++---
> include/uapi/linux/rseq.h | 21 ++++----------
> kernel/rseq.c | 28 +++++++++++--------
> kernel/sched/core.c | 5 ---
> kernel/sched/membarrier.c | 8 ++---
> 7 files changed, 48 insertions(+), 92 deletions(-)
> ---
>
[...]
> --- a/include/uapi/linux/rseq.h
> +++ b/include/uapi/linux/rseq.h
> @@ -114,20 +114,13 @@ struct rseq {
> /*
> * Restartable sequences flags field.
> *
> - * This field should only be updated by the thread which
> - * registered this data structure. Read by the kernel.
> - * Mainly used for single-stepping through rseq critical sections
> - * with debuggers.
> - *
> - * - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT
> - * Inhibit instruction sequence block restart on preemption
> - * for this thread.
> - * - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL
> - * Inhibit instruction sequence block restart on signal
> - * delivery for this thread.
> - * - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE
> - * Inhibit instruction sequence block restart on migration for
> - * this thread.
> + * This field was initialy intended to allow event masking for for
initialy -> initially
for for -> for
Other than those nits:
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
Powered by blists - more mailing lists