From: Eric Dumazet <eric.dumazet@gmail.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: "David Miller" <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
"Maciej Żenczykowski" <maze@google.com>,
"Tom Herbert" <therbert@google.com>,
"Lorenzo Colitti" <lorenzo@google.com>
Subject: Re: [PATCH net-next] net: only run neigh_forced_gc() from one cpu
Date: Wed, 19 Sep 2012 13:09:17 +0200 [thread overview]
Message-ID: <1348052957.26523.680.camel@edumazet-glaptop> (raw)
In-Reply-To: <1348052825.26523.676.camel@edumazet-glaptop>
On Wed, 2012-09-19 at 13:07 +0200, Eric Dumazet wrote:
> On Wed, 2012-09-19 at 06:50 -0400, Neil Horman wrote:
>
> > This is going to cause callers in neigh_alloc to immediately fail their
> > allocation attempts. Would it be a good idea to modify that call site so that
> > instead of returning NULL, instead reread tbl->entries before comparing to
> > gc_thresh3, on the hope that the cpu in the garbage collecting routine has freed
> > some entries?
>
> neigh_alloc() fails only if gc_thresh3 is hit, and if it is hit, we are
> under attack by definition.
>
> (the gc is run every 5 seconds is above gc_thresh2, and below
> gc_thresh3)
>
> No matter what you try, the attacker is going to be the winner.
>
> The best thing here is to drop packets, not spending several milli
> seconds to serve one packet, as queues are going to tail drop anyway.
>
I meant several hundred of milli seconds per packet.
In our tests we even trigger a softlockup, so thats more than 10 seconds
waiting for the rwlock, for a single packet.
next prev parent reply other threads:[~2012-09-19 11:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 9:27 [PATCH net-next] net: only run neigh_forced_gc() from one cpu Eric Dumazet
2012-09-19 10:50 ` Neil Horman
2012-09-19 11:07 ` Eric Dumazet
2012-09-19 11:09 ` Eric Dumazet [this message]
2012-09-19 12:54 ` Neil Horman
2012-09-19 17:45 ` David Miller
[not found] ` <CAKD1Yr11twYakD=-Mn8FiB11-xtyOLb-Q6XWmiE3H63SFRbzUw@mail.gmail.com>
2012-09-20 3:51 ` David Miller
2012-09-20 11:22 ` Lorenzo Colitti
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=1348052957.26523.680.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=lorenzo@google.com \
--cc=maze@google.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=therbert@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