Re: [PATCH v2 1/4] seqlock: introduce scoped_seqlock_read() and scoped_seqlock_read_irqsave()
From: Oleg Nesterov
Date: Wed Oct 08 2025 - 09:02:30 EST
On 10/08, Peter Zijlstra wrote:
>
> On Wed, Oct 08, 2025 at 02:30:45PM +0200, Oleg Nesterov wrote:
> >
> > scoped_seqlock_read_irqsave (&seqlock) {
> > // read-side critical section
> > }
> >
>
> Hmm, on first reading I was expecting that to be:
>
> do {
> seq = read_seqbegin(&seqlock);
>
> // read-side section
>
> } while (read_seqretry(&seqlock, seq));
>
> for lack of that _or_lock() wording, but I suppose we can make that
> something like:
>
> scoped_seqbegin_read (&seqlock) {
I was thinking about scoped_seqcount_read() but I agree with any naming
Oleg.