netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dsahern@gmail.com
Cc: eric.dumazet@gmail.com, shli@kernel.org, netdev@vger.kernel.org,
	Kernel-team@fb.com, shli@fb.com, weiwan@google.com,
	stephen@networkplumber.org
Subject: Re: [PATCH net-next V2] net ipv6: convert fib6_table rwlock to a percpu lock
Date: Fri, 04 Aug 2017 10:51:14 -0700 (PDT)	[thread overview]
Message-ID: <20170804.105114.438539102203155666.davem@davemloft.net> (raw)
In-Reply-To: <a297a638-83e6-41bf-e803-9a3fd158ad00@gmail.com>

From: David Ahern <dsahern@gmail.com>
Date: Fri, 4 Aug 2017 11:11:40 -0600

> On 8/4/17 11:07 AM, Eric Dumazet wrote:
>> On Fri, 2017-08-04 at 09:38 -0700, Shaohua Li wrote:
>>> From: Shaohua Li <shli@fb.com>
>>>
>>> In a syn flooding test, the fib6_table rwlock is a significant
>>> bottleneck. While converting the rwlock to rcu sounds straighforward,
>>> but is very challenging if it's possible. A percpu spinlock (lglock has
>>> been removed from kernel, so I added a simple implementation here) is
>>> quite trival for this problem since updating the routing table is a rare
>>> event. In my test, the server receives around 1.5 Mpps in syn flooding
>>> test without the patch in a dual sockets and 56-CPU system. With the
>>> patch, the server receives around 3.8Mpps, and perf report doesn't show
>>> the locking issue.
>>>
>>> Of course the percpu lock isn't as good as rcu, so this isn't intended
>>> to replace rcu, but this is much better than current readwrite lock.
>>> Before we have a rcu implementation, this is a good temporary solution.
>>> Plus, this is a trival change, there is nothing to prevent pursuing a
>>> rcu implmentation.
>>>
>>> Cc: Wei Wang <weiwan@google.com>
>>> Cc: Eric Dumazet <eric.dumazet@gmail.com>
>>> Cc: Stephen Hemminger <stephen@networkplumber.org>
>>> Signed-off-by: Shaohua Li <shli@fb.com>
>>> ---
>> 
>> Wei has almost done the RCU conversion.
>> 
>> This patch is probably coming too late.
> 
> 
> +1
> 
> I'd rather see the RCU conversion than a move to per-cpu locks.

Me too.

      parent reply	other threads:[~2017-08-04 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04 16:38 [PATCH net-next V2] net ipv6: convert fib6_table rwlock to a percpu lock Shaohua Li
2017-08-04 17:07 ` Eric Dumazet
2017-08-04 17:11   ` David Ahern
2017-08-04 17:20     ` Wei Wang
2017-08-04 17:51     ` David Miller [this message]

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=20170804.105114.438539102203155666.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Kernel-team@fb.com \
    --cc=dsahern@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=shli@fb.com \
    --cc=shli@kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=weiwan@google.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).