Subject: Re: [PATCH net-next] bnxt_en: replace PTP spinlock with seqlock

From: Jakub Kicinski <[email-masked]>
Date: Tue, 15 Oct 2024 08:41:57 -0700

On Tue, 15 Oct 2024 11:25:00 +0100 Vadim Fedorenko wrote:
> > I think when you adjtime / adjfine (IOW on all the write path) you still
> > need the spin lock. But in addition also the seq lock. And then the
> > read path can take just the seq lock.  
> 
> I think there is a spinlock in seqlock_t which is used to prevent
> multiple writers.

My bad.

> > This will also remove any uncertainty about the bit ops.  
> 
> Should I use read_seqlock_excl_bh()/write_seqlock_bh() for the bit ops
> then?

Yup, modulo what Micheal said in the other leg of the thread, but SGTM.