[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1299031203.2930.26.camel@edumazet-laptop>
Date: Wed, 02 Mar 2011 03:00:03 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Thomas Graf <tgraf@...radead.org>,
David Miller <davem@...emloft.net>, rick.jones2@...com,
therbert@...gle.com, wsommerfeld@...gle.com,
daniel.baluta@...il.com, netdev@...r.kernel.org
Subject: Re: SO_REUSEPORT - can it be done in kernel?
Le mercredi 02 mars 2011 à 08:23 +0800, Herbert Xu a écrit :
> On Tue, Mar 01, 2011 at 05:31:24PM +0100, Eric Dumazet wrote:
> >
> > This wont work for tcp streams, you could imagine a multi-threaded
> > application using a shared tcp socket as well. Too many OOO packets.
>
> Think about it, a TCP socket cannot be used by a multi-threaded app
> in a scalable way.
Well...
If you think about it, SO_REUSEPORT patch has exactly the same goal :
Let each thread use a different socket, to scale without kernel limits.
We cant modify TX selection each time we want to "fix" a problem without
changing user side (not adding an API), and as side effect make non
optimal applications become miserable.
We added RPS and XPS that works correctly if each socket is used by one
thread. Maybe we need to add an user API or automatically detect a
particular DGRAM socket is used by many different threads to :
0) Decide OOM is ok for this workload (many threads issuing send() at
the same time)
1) Setup several receive queues (up to num_possible_cpus())
2) Use an appropriate TX queue selection
--
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