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

From: Jakub Kicinski <[email-masked]>
Date: Mon, 14 Oct 2024 16:35:38 -0700

On Mon, 14 Oct 2024 16:29:47 -0700 Vadim Fedorenko wrote:
> -	spin_lock_bh(&ptp->ptp_lock);
> +	write_seqlock_irqsave(&ptp->ptp_lock, flags);
>  	timecounter_adjtime(&ptp->tc, delta);
> -	spin_unlock_bh(&ptp->ptp_lock);
> +	write_sequnlock_irqrestore(&ptp->ptp_lock, flags);

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.

This will also remove any uncertainty about the bit ops.