[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <999E136D-49BE-4AEE-8392-C09D0511351C@oracle.com>
Date: Thu, 30 Oct 2025 22:01:15 +0000
From: Prakash Sangappa <prakash.sangappa@...cle.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra
	<peterz@...radead.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Boqun Feng <boqun.feng@...il.com>, Jonathan Corbet <corbet@....net>,
        Madadi Vineeth Reddy
	<vineethr@...ux.ibm.com>,
        K Prateek Nayak <kprateek.nayak@....com>,
        Steven
 Rostedt <rostedt@...dmis.org>,
        Sebastian Andrzej Siewior
	<bigeasy@...utronix.de>,
        Arnd Bergmann <arnd@...db.de>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>
Subject: Re: [patch V3 02/12] rseq: Add fields and constants for time slice
 extension
> On Oct 29, 2025, at 6:22 AM, Thomas Gleixner <tglx@...utronix.de> wrote:
> 
> Aside of a Kconfig knob add the following items:
> 
>   - Two flag bits for the rseq user space ABI, which allow user space to
>     query the availability and enablement without a syscall.
> 
>   - A new member to the user space ABI struct rseq, which is going to be
>     used to communicate request and grant between kernel and user space.
> 
>   - A rseq state struct to hold the kernel state of this
> 
>   - Documentation of the new mechanism
> 
[…]
> +
> +If both the request bit and the granted bit are false when leaving the
> +critical section, then this indicates that a grant was revoked and no
> +further action is required by userspace.
> +
> +The required code flow is as follows::
> +
> +    rseq->slice_ctrl.request = 1;
> +    critical_section();
> +    if (rseq->slice_ctrl.granted)
> +         rseq_slice_yield();
> +
> +As all of this is strictly CPU local, there are no atomicity requirements.
> +Checking the granted state is racy, but that cannot be avoided at all::
> +
> +    if (rseq->slice_ctrl & GRANTED)
Could this be?
	if (rseq->slice_ctrl.granted)
> +      -> Interrupt results in schedule and grant revocation
> +        rseq_slice_yield();
> +
-Prakash
Powered by blists - more mailing lists
 
