From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
David Miller <davem@davemloft.net>,
Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: act_mirred: remove spinlock in fast path
Date: Sat, 18 Jun 2016 11:24:44 -0400 [thread overview]
Message-ID: <576567BC.9040201@mojatatu.com> (raw)
In-Reply-To: <1466262966.6850.2.camel@edumazet-glaptop3.roam.corp.google.com>
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
next prev parent reply other threads:[~2016-06-18 15:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 21:03 act_mirred: remove spinlock in fast path Cong Wang
2016-06-17 21:24 ` Eric Dumazet
2016-06-17 21:35 ` Cong Wang
2016-06-17 21:40 ` Eric Dumazet
2016-06-17 21:59 ` Cong Wang
2016-06-17 22:03 ` Eric Dumazet
2016-06-18 13:45 ` Jamal Hadi Salim
2016-06-18 15:16 ` Eric Dumazet
2016-06-18 15:24 ` Jamal Hadi Salim [this message]
2016-06-18 16:13 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=576567BC.9040201@mojatatu.com \
--to=jhs@mojatatu.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).