All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: Eric Dumazet <edumazet@google.com>, Cong Wang <xiyou.wangcong@gmail.com>
Cc: 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 09:45:06 -0400	[thread overview]
Message-ID: <57655062.1080407@mojatatu.com> (raw)
In-Reply-To: <CANn89iK3DLjJ6y34y1=pnUmH0RKBwwQWj4ZzizVmm98BXxGxYA@mail.gmail.com>

On 16-06-17 06:03 PM, Eric Dumazet wrote:
> On Fri, Jun 17, 2016 at 2:59 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>
>> Generally speaking I worry about we change multiple fields in a struct
>> meanwhile we could still read them any time in the middle, we may
>> get them correct for some easy case, but it is hard to insure the
>> correctness when the struct becomes large.
>>
>> I am thinking to make more tc actions lockless, so this problem
>> comes up immediately for other complex cases than mirred.
>
> I certainly wont object to a patch.
>
> Also note that instead of RCU with a pointer and the usual kfree_rcu() stuff,
> we now can use seqcount_latch infra which might allow to not increase
> memory foot print.
>

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_ ;->

cheers,
jamal

  reply	other threads:[~2016-06-18 13:45 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 [this message]
2016-06-18 15:16             ` Eric Dumazet
2016-06-18 15:24               ` Jamal Hadi Salim
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=57655062.1080407@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.