From: Eric Dumazet <eric.dumazet@gmail.com>
To: Tom Herbert <therbert@google.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
netdev@vger.kernel.org, davem@davemloft.net,
netdev@markandruth.co.uk
Subject: Re: [PATCH 1/5] soreuseport: infrastructure
Date: Wed, 16 Jan 2013 11:13:06 -0800 [thread overview]
Message-ID: <1358363586.32167.17.camel@edumazet-glaptop> (raw)
In-Reply-To: <CA+mtBx9UqyM-wTmX_ojNdH=oQO28i_4aV_z5mz1OiKJBzRRNnw@mail.gmail.com>
On Wed, 2013-01-16 at 10:37 -0800, Tom Herbert wrote:
> > Ideally, we should chose a target given by the current CPU number, in
> > case SYN messages are spread on all cpus or a set of cpus.
> >
> It is an ideal, but I don't readily see a practical way to do this
> given the available information, the fact that number of sockets
> created is up to the application, and the fact that there is no fixed
> binding of a socket to CPU.
>
> Consider the simple "cpu % num" algorithm in packet fanout. Suppose
> is a 16 CPU system, and RX queues for the NIC are processed on CPUS
> 0,3,7,11 and user creates 4 sockets. In this configuration, on the
> first socket would ever be selected!
Sure, any hand coded 'optimization' should be correctly done.
On a 16 cpus system, I would create 16 queues, if we stick to the "cpu %
nr_queues" simple selection.
If some queues are never used, thats not a big deal, unless you have a
crazy spin polling of the queues. A blocked thread consumes almost
nothing.
It would be a rather straightforward patch to add mask capability to
af_packet (a la rps_cpus ), if we really wanted 4 queues, served by cpus
0,3,7,11 but I don't think there is an urgent need.
Another way would be to let user land to declare a preferred cpu for the
queue, even if not related to process scheduler affinity.
Anyway, this can be addressed later, in followup patches.
next prev parent reply other threads:[~2013-01-16 19:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 20:00 [PATCH 1/5] soreuseport: infrastructure Tom Herbert
2013-01-15 15:53 ` Stephen Hemminger
2013-01-15 16:14 ` Eric Dumazet
2013-01-16 18:37 ` Tom Herbert
2013-01-16 19:13 ` Eric Dumazet [this message]
[not found] ` <20130116224734.GA28741@ppwaskie-mobl2.jf.intel.com>
2013-01-20 23:33 ` Tom Herbert
-- strict thread matches above, loose matches on Subject: below --
2013-01-22 19:49 Tom Herbert
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=1358363586.32167.17.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@markandruth.co.uk \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--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