[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <576567BC.9040201@mojatatu.com>
Date: Sat, 18 Jun 2016 11:24:44 -0400
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Eric Dumazet <eric.dumazet@...il.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 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?
cheers,
jamal
Powered by blists - more mailing lists