Re: [PATCH 1/5] seqlock: simplify SEQCOUNT_LOCKNAME()

Peter Zijlstra
2023-09-21T21:00:40Z

On Thu, Sep 21, 2023 at 01:48:26PM +0200, Oleg Nesterov wrote:
> On 09/16, Peter Zijlstra wrote:
> >
> > On Wed, Sep 13, 2023 at 05:49:53PM +0200, Oleg Nesterov wrote:
> > > 1. Kill the "lockmember" argument. It is always s->lock plus
> > > __seqprop_##lockname##_sequence() already uses s->lock and
> > > ignores "lockmember".
> > >
> > > 2. Kill the "lock_acquire" argument. __seqprop_##lockname##_sequence()
> > > can use the same "lockbase" prefix for _lock and _unlock.
> > >
> > > Apart from line numbers, gcc -E outputs the same code.
> >
> > With seqlock_ww_mutex gone, yes this is a nice cleanup.
>
> Thanks.
>
> Can you look at 2/5? To me it looks like a good cleanup too.
> I am going to resend 1/5 and 2/5, as no one is interested in
> stats_lock change.

2 seems okay. Will need a new changelog without the rest thouhg. Perhaps
talk about how it perserves the constness instead?