Subject: Re: [PATCH] Software receive packet steering

From: Jens Axboe <[email-masked]>
Date: Thu, 23 Apr 2009 08:58:30 +0200

On Wed, Apr 22 2009, Jesper Dangaard Brouer wrote:
> On Wed, 22 Apr 2009, David Miller wrote:
>
>> One thought I keep coming back to is the hack the block layer
>> is using right now.  It remembers which CPU a block I/O request
>> comes in on, and it makes sure the completion runs on that
>> cpu too.

Hack?! :-)

It's actually nicely integrated to our existing IO completion path,
where we raise a softirq to complete the IO out of path. The only
difference now being that if you enable rq_affinity, it'll raise the
softirq potentially on a remote CPU except of always using the local
one.

> This is also very important for routing performance.
>
> Experiences from practical 10GbE routing tests (done by Roberts team and
> my self), reveals that we can only achieve (close to) 10Gbit/s routing
> performance when carefully making sure that the rx-queue and tx-queue runs
> on the same CPU. (Not doing so really kills performance).
>
> Currently I'm using some patches by Jens Låås, that allows userspace to
> setup the rx-queue to tx-queues mapping, plus manual smp_affinity tuning.
> The problem with this approach is that it requires way too much manual
> tuning from userspace to achieve good performance.
>
> I would like to see an approach with less manual tuning, as we basically
> "just" need to make sure that TX completion is done on the same CPU as RX.
> I would like to see some effort in this area and is willing to partisipate
> actively.

I saw very nice benefits on the IO side as well!

-- 
Jens Axboe