From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamal Hadi Salim Subject: Re: [Patch net-next] net_sched: hold tcf_lock in netdevice notifier Date: Sat, 19 Jul 2014 18:02:13 -0400 Message-ID: <53CAEAE5.3090300@mojatatu.com> References: <1405545931-13832-1-git-send-email-xiyou.wangcong@gmail.com> <1405545931-13832-2-git-send-email-xiyou.wangcong@gmail.com> <53C7C675.7090400@mojatatu.com> <1405621030.10255.84.camel@edumazet-glaptop2.roam.corp.google.com> <1405661823.10255.86.camel@edumazet-glaptop2.roam.corp.google.com> <1405667332.10255.92.camel@edumazet-glaptop2.roam.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Linux Kernel Network Developers , "David S. Miller" , Cong Wang To: Eric Dumazet , Cong Wang Return-path: Received: from mail-wg0-f51.google.com ([74.125.82.51]:64218 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750878AbaGSWC1 (ORCPT ); Sat, 19 Jul 2014 18:02:27 -0400 Received: by mail-wg0-f51.google.com with SMTP id b13so4889410wgh.10 for ; Sat, 19 Jul 2014 15:02:26 -0700 (PDT) In-Reply-To: <1405667332.10255.92.camel@edumazet-glaptop2.roam.corp.google.com> Sender: netdev-owner@vger.kernel.org List-ID: On 07/18/14 03:08, Eric Dumazet wrote: > On Thu, 2014-07-17 at 22:51 -0700, Cong Wang wrote: > > If this conversion was already done by John, I would have pointed the > patch to finalize. > > There is nothing fundamental that requires this spinlock being held in > fast path. > > It is perfectly possible to remove this, and first step is to use RCU, > then percpu counters. > I think rcufication would help in some the shared action instances. Note: post John's rcu-fication of classifier path this is not an issue i.e the most common use case default behavior (majority) is no sharing of instances - in such a case there is no lock contention. cheers, jamal