[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1358363586.32167.17.camel@edumazet-glaptop>
Date: Wed, 16 Jan 2013 11:13:06 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Tom Herbert <therbert@...gle.com>
Cc: Stephen Hemminger <stephen@...workplumber.org>,
netdev@...r.kernel.org, davem@...emloft.net,
netdev@...kandruth.co.uk
Subject: Re: [PATCH 1/5] soreuseport: infrastructure
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists