[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1405667332.10255.92.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Fri, 18 Jul 2014 09:08:52 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Jamal Hadi Salim <jhs@...atatu.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Cong Wang <cwang@...pensource.com>
Subject: Re: [Patch net-next] net_sched: hold tcf_lock in netdevice notifier
On Thu, 2014-07-17 at 22:51 -0700, Cong Wang wrote:
> On Thu, Jul 17, 2014 at 10:37 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> > On Thu, 2014-07-17 at 14:25 -0700, Cong Wang wrote:
> >> On Thu, Jul 17, 2014 at 11:17 AM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> >> >
> >> > Anyway, tcfm_dev should probably be RCU protected.
> >> >
> >>
> >> Not sure how much we gain from making it RCU. We anyway
> >> need to hold that spinlock on fast path since we need to
> >> update its time stamp and stats.
> >>
> >> I would just leave it as is.
> >
> >
> > I think you really should look at John Fastabend work, and many other
> > existing paths in the stack.
> >
>
> I reviewed the last two verions of his patchset...
>
>
> > All this can be done lockless in fast path, using RCU and percpu
> > counters.
> >
>
> I don't think he ever removes this m->tcf_lock.
Apparently you have hard time to understand the suggestion.
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists