From: Andi Kleen <andi@firstfloor.org>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
Jeff Garzik <jeff@garzik.org>,
andi@firstfloor.org, arjan@infradead.org, jens.axboe@oracle.com,
linux-kernel@vger.kernel.org, douglas.w.styner@intel.com,
chinang.ma@intel.com, terry.o.prickett@intel.com,
matthew.r.wilcox@intel.com, netdev@vger.kernel.org,
Jesse Brandeburg <jesse.brandeburg@intel.com>
Subject: Re: >10% performance degradation since 2.6.18
Date: Mon, 6 Jul 2009 10:38:27 +0200 [thread overview]
Message-ID: <20090706083827.GA28145@one.firstfloor.org> (raw)
In-Reply-To: <20090705130926.GS5480@parisc-linux.org>
On Sun, Jul 05, 2009 at 07:09:26AM -0600, Matthew Wilcox wrote:
> On Sun, Jul 05, 2009 at 12:01:37PM +0800, Herbert Xu wrote:
> > > If yes, how to best handle when the scheduler moves app to another CPU?
> > > Should we reprogram the NIC hardware flow steering mechanism at that point?
> >
> > Not really. For now the best thing to do is to pin everything
> > down and not move at all, because we can't afford to move.
> >
> > The only way for moving to work is if we had the ability to get
> > the sockets to follow the processes. That means, we must have
> > one RX queue per socket.
>
> Maybe not one RX queue per socket -- sockets belonging to the same
> thread could share the same RX queue. I'm fairly ignorant of the way
> networking works these days; is it possible to dynamically reassign a
> socket between RX queues, so we'd only need one RX queue per CPU?
That is how it is supposed to work (ignoring some special setups
with QoS) in theory.
a You have per CPU RX queues (or if the NIC has less than CPUs, then on a
subset of CPUs)
b The NIC uses a hash function on the stream (= socket) to map an
incoming packet to a specific RX queue.
c The interrupt handler is supposed to be bound on a specific CPU.
d The CPU then does wakeups and the scheduler biases the process/thread
using the sockets towards the CPU that always does the wakeups.
Ideally then the process/thread doing the socket IO should be on
the receiving CPU. It doesn't always work out like this in practice,
but it should.
(c) seems to be the part that is broken right now.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2009-07-06 8:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090703025607.GK5480@parisc-linux.org>
[not found] ` <87skhdaaub.fsf@basil.nowhere.org>
[not found] ` <20090703185414.GP23611@kernel.dk>
[not found] ` <20090703191321.GO5480@parisc-linux.org>
[not found] ` <20090703192235.GV23611@kernel.dk>
[not found] ` <20090703194557.GQ5480@parisc-linux.org>
[not found] ` <20090703195458.GK2041@one.firstfloor.org>
[not found] ` <20090703130421.646fe5cb@infradead.org>
[not found] ` <20090703233505.GL2041@one.firstfloor.org>
[not found] ` <20090703230408.4433ee39@infradead.org>
[not found] ` <20090704084430.GO2041@one.firstfloor.org>
2009-07-04 9:19 ` >10% performance degradation since 2.6.18 Jeff Garzik
2009-07-05 4:01 ` Herbert Xu
2009-07-05 13:09 ` Matthew Wilcox
2009-07-05 16:11 ` Herbert Xu
2009-07-06 8:38 ` Andi Kleen [this message]
2009-07-05 20:44 ` Jeff Garzik
2009-07-06 1:19 ` Herbert Xu
2009-07-06 8:45 ` Andi Kleen
2009-07-06 17:00 ` Rick Jones
2009-07-06 17:36 ` Ma, Chinang
2009-07-06 17:42 ` Matthew Wilcox
2009-07-06 17:57 ` Ma, Chinang
2009-07-06 18:05 ` Matthew Wilcox
2009-07-06 18:48 ` Ma, Chinang
2009-07-06 18:53 ` Matthew Wilcox
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=20090706083827.GA28145@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=arjan@infradead.org \
--cc=chinang.ma@intel.com \
--cc=douglas.w.styner@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=jeff@garzik.org \
--cc=jens.axboe@oracle.com \
--cc=jesse.brandeburg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.r.wilcox@intel.com \
--cc=matthew@wil.cx \
--cc=netdev@vger.kernel.org \
--cc=terry.o.prickett@intel.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).