netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] icmp: add a global rate limitation
Date: Mon, 22 Sep 2014 16:09:04 -0400 (EDT)	[thread overview]
Message-ID: <20140922.160904.1566383839759663411.davem@davemloft.net> (raw)
In-Reply-To: <1411137520.26859.13.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 19 Sep 2014 07:38:40 -0700

> Current ICMP rate limiting uses inetpeer cache, which is an RBL tree
> protected by a lock, meaning that hosts can be stuck hard if all cpus
> want to check ICMP limits.

However, the replacement uses a single global spinlock for
synchronization.

 ...
> Note that if we really want to send millions of ICMP messages per
> second, we might extend idea and infra added in commit 04ca6973f7c1a
> ("ip: make IP identifiers less predictable") :
> add a token bucket in the ip_idents hash and no longer rely on inetpeer.

That would be preferred.

I don't really see how this patch makes things better.  The code goes
through a global spinlock unconditionally, and if it passes then it
looks up the inetpeer anyways.

I need more information to be convinced that this is an improvement
and that it actually solves the stated problem.  I'm sure you also
have some performance metrics to share, right? :-)

  parent reply	other threads:[~2014-09-22 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-19 14:38 [PATCH net-next] icmp: add a global rate limitation Eric Dumazet
2014-09-19 14:56 ` Joe Perches
2014-09-19 15:11   ` Eric Dumazet
2014-09-22 20:09 ` David Miller [this message]
2014-09-22 20:25   ` Eric Dumazet
2014-09-23 16:48 ` David Miller

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=20140922.160904.1566383839759663411.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).