From: Rick Jones <rick.jones2@hp.com>
To: Willem de Bruijn <willemb@google.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Tom Herbert <therbert@google.com>
Subject: Re: [PATCH net-next] rps: overflow prevention for saturated cpus
Date: Thu, 06 Dec 2012 15:45:38 -0800 [thread overview]
Message-ID: <50C12E22.3030206@hp.com> (raw)
In-Reply-To: <CA+FuTSc=-TE4X=VWmdXMLhE_jn6CtjUpauznt4evrRLi-DOd2g@mail.gmail.com>
On 12/06/2012 03:04 PM, Willem de Bruijn wrote:
> On Thu, Dec 6, 2012 at 5:25 PM, Rick Jones <rick.jones2@hp.com> wrote:
>> I thought (one of) the ideas behind RFS at least was to give the CPU
>> scheduler control over where network processing took place instead of it
>> being dictated solely by the addressing. I would have expected the CPU
>> scheduler to migrate some work off the saturated CPU. Or will this only
>> affect RPS and not RFS?
>
> I wrote it with RPS in mind, indeed. With RFS, for sufficiently
> multithreaded applications that are unpinned, the scheduler will
> likely spread the threads across as many cpus as possible. In that
> case, the mechanism will not kick in, or as quickly. Even with RFS,
> pinned threads and single-threaded applications will likely also
> benefit during high load from redirecting kernel receive
> processing away from the cpu that runs the application thread. I
> haven't tested that case independently.
Unless that single-threaded application (or single receiving thread) is
pinned to a CPU, isn't there a non-trivial chance that incoming traffic
flowing up different CPUs will cause it to be bounced from one CPU to
another, taking its cache lines with it and not just the "intra-stack"
cache lines?
Long (?) ago and far away it was possible to say that a given IRQ should
be potentially serviced by more than one CPU (if I recall though not
phrase correctly). Didn't that get taken away because it did such nasty
things like reordering and such? (Admittedly, I'm really stretching the
limits of my dimm memory there)
>> What kind of workload is this targeting that calls for
>> such intra-flow parallelism?
>
> Packet processing middeboxes that rather operate in degraded mode
> (reordering) than drop packets. Intrusion detection systems and proxies,
> for instance. These boxes are actually likely to have RPS enabled and
> RFS disabled.
>
>> With respect to the examples given, what happens when it is TCP traffic
>> rather than UDP?
>
> That should be identical. RFS is supported for both protocols. In the
> test, it is turned off to demonstrate the effect solely with RPS.
Will it be identical with TCP? If anything, I would think causing
reordering of the TCP segments within flows would only further increase
the workload of the middlebox because it will increase the ACK rates.
Perhaps quite significantly if GRO was effective at the receivers before
the reordering started.
At least unless/until the reordering is bad enough to cause the sending
TCPs to fast retransmit and so throttle back. And unless we are talking
about being overloaded by massive herds of "mice" I'd think that the TCP
flows would be throttling back to what the single CPU in the middlebox
could handle.
rick
next prev parent reply other threads:[~2012-12-06 23:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 20:36 [PATCH net-next] rps: overflow prevention for saturated cpus Willem de Bruijn
2012-12-06 22:25 ` Rick Jones
2012-12-06 23:04 ` Willem de Bruijn
2012-12-06 23:45 ` Rick Jones [this message]
2012-12-07 16:04 ` Willem de Bruijn
2012-12-07 14:51 ` Ben Hutchings
2012-12-07 16:41 ` Willem de Bruijn
2012-12-07 19:20 ` David Miller
2012-12-10 20:09 ` 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=50C12E22.3030206@hp.com \
--to=rick.jones2@hp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--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 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).