[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241014163538.1ac0d88d@kernel.org>
Date: Mon, 14 Oct 2024 16:35:38 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Vadim Fedorenko <vadfed@...a.com>
Cc: Michael Chan <michael.chan@...adcom.com>, Vadim Fedorenko
<vadim.fedorenko@...ux.dev>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
<netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] bnxt_en: replace PTP spinlock with seqlock
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.
Powered by blists - more mailing lists