All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: willemb@google.com
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org,
	stephen@networkplumber.org
Subject: Re: [PATCH net-next v5] rps: selective flow shedding during softnet overflow
Date: Thu, 25 Apr 2013 04:20:07 -0400 (EDT)	[thread overview]
Message-ID: <20130425.042007.1583080085524610665.davem@davemloft.net> (raw)
In-Reply-To: <1366763847-9279-1-git-send-email-willemb@google.com>

From: Willem de Bruijn <willemb@google.com>
Date: Tue, 23 Apr 2013 20:37:27 -0400

> A cpu executing the network receive path sheds packets when its input
> queue grows to netdev_max_backlog. A single high rate flow (such as a
> spoofed source DoS) can exceed a single cpu processing rate and will
> degrade throughput of other flows hashed onto the same cpu.
> 
> This patch adds a more fine grained hashtable. If the netdev backlog
> is above a threshold, IRQ cpus track the ratio of total traffic of
> each flow (using 4096 buckets, configurable). The ratio is measured
> by counting the number of packets per flow over the last 256 packets
> from the source cpu. Any flow that occupies a large fraction of this
> (set at 50%) will see packet drop while above the threshold.
> 
> Tested:
> Setup is a muli-threaded UDP echo server with network rx IRQ on cpu0,
> kernel receive (RPS) on cpu0 and application threads on cpus 2--7
> each handling 20k req/s. Throughput halves when hit with a 400 kpps
> antagonist storm. With this patch applied, antagonist overload is
> dropped and the server processes its complete load.
> 
> The patch is effective when kernel receive processing is the
> bottleneck. The above RPS scenario is a extreme, but the same is
> reached with RFS and sufficient kernel processing (iptables, packet
> socket tap, ..).
> 
> Signed-off-by: Willem de Bruijn <willemb@google.com>

This does't compile:

net/core/sysctl_net_core.c: In function ‘flow_limit_cpu_sysctl’:
net/core/sysctl_net_core.c:114:10: error: invalid type argument of ‘->’ (have ‘struct mutex’)

Also, please change the Kconfig entry to be:

config NET_FLOW_LIMIT
	boolean
	depends on RPS
	default y


like RPS et al. are.

Thanks.

  parent reply	other threads:[~2013-04-25  8:20 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19 17:46 [PATCH] rps: selective flow shedding during softnet overflow Willem de Bruijn
2013-04-19 17:58 ` Eric Dumazet
2013-04-22 20:40   ` Willem de Bruijn
2013-04-22 20:46     ` [PATCH net-next v2] " Willem de Bruijn
2013-04-22 22:30       ` Eric Dumazet
2013-04-23 18:45         ` Willem de Bruijn
2013-04-23 18:46           ` [PATCH net-next v3] " Willem de Bruijn
2013-04-23 19:18             ` Eric Dumazet
2013-04-23 20:30               ` Willem de Bruijn
2013-04-23 20:31                 ` [PATCH net-next v4] " Willem de Bruijn
2013-04-23 21:23                   ` Stephen Hemminger
2013-04-23 21:37                     ` Willem de Bruijn
2013-04-23 21:37                     ` Eric Dumazet
2013-04-23 21:52                       ` Stephen Hemminger
2013-04-23 22:34                         ` David Miller
2013-04-24  0:09                         ` Eric Dumazet
2013-04-24  0:37                           ` [PATCH net-next v5] " Willem de Bruijn
2013-04-24  1:07                             ` Eric Dumazet
2013-04-25  8:20                             ` David Miller [this message]
2013-05-20 14:02                               ` [PATCH net-next v6] " Willem de Bruijn
2013-05-20 16:00                                 ` Eric Dumazet
2013-05-20 16:08                                   ` Willem de Bruijn
2013-05-20 20:48                                   ` David Miller
2013-04-24  1:25                           ` [PATCH net-next v4] " Jamal Hadi Salim
2013-04-24  1:32                             ` Eric Dumazet
2013-04-24  1:44                               ` Jamal Hadi Salim
2013-04-24  2:11                                 ` Eric Dumazet
2013-04-24 13:00                                   ` Jamal Hadi Salim
2013-04-24 14:41                                     ` Eric Dumazet
2013-04-23 22:33                     ` David Miller
2013-04-23 21:34                   ` Eric Dumazet
2013-04-23 22:41                   ` David Miller
2013-04-23 23:11                     ` Eric Dumazet
2013-04-23 23:15                       ` David Miller
2013-04-23 23:26                         ` Eric Dumazet
2013-04-24  0:03                         ` Stephen Hemminger
2013-04-24  0:00                     ` Willem de Bruijn
2013-04-23 20:46                 ` [PATCH net-next v3] " Eric Dumazet
2013-04-19 19:03 ` [PATCH] " Stephen Hemminger
2013-04-19 19:21   ` Eric Dumazet
2013-04-19 20:11   ` Willem de Bruijn

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=20130425.042007.1583080085524610665.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=willemb@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 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.