Re: [PATCH 1/5] seqlock: simplify SEQCOUNT_LOCKNAME()
From: Peter Zijlstra
Date: Thu Sep 21 2023 - 17:00:39 EST
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?