[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1466266425.6850.3.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Sat, 18 Jun 2016 09:13:45 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jamal Hadi Salim <jhs@...atatu.com>
Cc: Eric Dumazet <edumazet@...gle.com>,
Cong Wang <xiyou.wangcong@...il.com>,
David Miller <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: act_mirred: remove spinlock in fast path
On Sat, 2016-06-18 at 11:24 -0400, Jamal Hadi Salim wrote:
> On 16-06-18 11:16 AM, Eric Dumazet wrote:
>
> >> Given an update/replace of an action is such a rare occassion, what
> >> is wrong with init doing a spin lock on existing action?
> >> Sure, there is performance impact on fast path at that point - but:
> >> as established update/replace is _a rare occassion_ ;->
> >
> > The potential 'problem' is not the write side, but the read side.
> >
> > If you read say 3 values <A, B, C> you might want to read them in a
> > consistent way, instead of <new_A, old_B, old_C>
> >
>
> That part i get.
> What i meant is: while the fast path is doing rcu_read_lock()
> of <A, B, C> and on the rare occassion that _init() is doing a
> write to <A,B,C> then if it should spin lock it would not corrupt
> what fast path sees as <A, B, C> during the transition.
> Am i misunderstanding?
Yes, I do not see how a change in the write side can help.
You probably need a bit of coffee ;)
Powered by blists - more mailing lists