From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH net-next 2/2] pfifo_fast: drop unneeded additional lock on dequeue Date: Wed, 16 May 2018 17:24:47 +0300 Message-ID: <20180516172427-mutt-send-email-mst@kernel.org> References: <8a1740148995663939837bedb14f29716c7cf6f5.1526392746.git.pabeni@redhat.com> <20180515221013-mutt-send-email-mst@kernel.org> <1526457376.2553.1.camel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, "David S. Miller" , Jamal Hadi Salim , Cong Wang , Jiri Pirko , John Fastabend To: Paolo Abeni Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51190 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751395AbeEPOYs (ORCPT ); Wed, 16 May 2018 10:24:48 -0400 Content-Disposition: inline In-Reply-To: <1526457376.2553.1.camel@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, May 16, 2018 at 09:56:16AM +0200, Paolo Abeni wrote: > On Tue, 2018-05-15 at 23:17 +0300, Michael S. Tsirkin wrote: > > On Tue, May 15, 2018 at 04:24:37PM +0200, Paolo Abeni wrote: > > > After the previous patch, for NOLOCK qdiscs, q->seqlock is > > > always held when the dequeue() is invoked, we can drop > > > any additional locking to protect such operation. > > > > > > Signed-off-by: Paolo Abeni > > > --- > > > include/linux/skb_array.h | 5 +++++ > > > net/sched/sch_generic.c | 4 ++-- > > > 2 files changed, 7 insertions(+), 2 deletions(-) > > > > Is the seqlock taken during qdisc_change_tx_queue_len? > > We need to prevent that racing with dequeue. > > Thanks for the head-up! I missed that code-path. > > I'll add the lock in qdisc_change_tx_queue_len() in v2. > > Thanks you, > > Paolo When you do, make sure locks nest consistently.