netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Tom Herbert <therbert@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next-2.6] net: Xmit Packet Steering (XPS)
Date: Fri, 20 Nov 2009 06:08:29 +0100	[thread overview]
Message-ID: <4B06244D.9060004@gmail.com> (raw)
In-Reply-To: <65634d660911191641o4210a797mf1e8168dd8dd8b60@mail.gmail.com>

Tom Herbert a écrit :
> 
> 
> On Thu, Nov 19, 2009 at 3:46 PM, Eric Dumazet <eric.dumazet@gmail.com
> <mailto:eric.dumazet@gmail.com>> wrote:
> 
>     Here is first version of XPS.
> 
> Very cool!  The infrastructure to move lists of skb's from cpu to
> another and the IPI to kick processing look like something that could be
> consolidated between rps and xps :-)

Sure, but RPS seems quite slow to integrate (no offense Tom) :)
I wanted to cook a patch on top on yours, but got no sign you were
about to release RPS version 4 soon.

> 
>     Goal of XPS is to free TX completed skbs by the cpu that submitted
>     the transmit.
> 
>     Because I chose to union skb->iif with skb->sending_cpu, I chose
>     to introduce a new xps_consume_skb(skb), and not generalize
>     consume_skb() itself.
> 
>     This means that selected drivers must use new function to benefit
>     from XPS
> 
> 
> Is this better than modifying consume_skb so this can be used by any driver?

consume_skb() is also used by RX side, and this side doesnt want XPS.

Adding a flag in skb to differentiate the use might be possible,
but we add a new test in hot paths...

>  
> 
>      
> 
>     Preliminary tests are quite good, especially on NUMA machines.
> 
>     Only NAPI drivers can use this new infrastructure (xps_consume_skb()
>     cannot
>     be called from hardirq context, only from softirq)
> 
> Is this a strict requirement, especially considering devices with
> separate TX interrupts?  For a hardirq we could we just put the skb on
> local percpu queue and schedule a softirq to do the ipi.

I chose this way because any sane and up2date driver should really
not use hardirqs TX completion. I want fast processing, without
masking local interrupts in xps_consume_skb(), and wihout testing
our context.

Note : if TX completion and RX are run in different NAPI contexts,
there is no problem using xps_consume_skb().


Thanks for reviewing Tom.

  parent reply	other threads:[~2009-11-20  5:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19 23:46 [PATCH net-next-2.6] net: Xmit Packet Steering (XPS) Eric Dumazet
2009-11-20  2:12 ` Changli Gao
2009-11-20  4:58   ` Eric Dumazet
2009-11-20  5:11     ` Changli Gao
2009-11-20  5:24       ` Eric Dumazet
2009-11-20  5:34         ` Changli Gao
2009-11-20  5:42           ` Eric Dumazet
2009-11-20  5:50             ` Changli Gao
     [not found] ` <65634d660911191641o4210a797mf1e8168dd8dd8b60@mail.gmail.com>
2009-11-20  5:08   ` Eric Dumazet [this message]
2009-11-20 13:32 ` Jarek Poplawski
2009-11-20 14:45   ` Eric Dumazet
2009-11-20 20:04     ` Jarek Poplawski
2009-11-20 21:43       ` Eric Dumazet
2009-11-20 22:08         ` Jarek Poplawski
2009-11-20 22:21           ` Eric Dumazet
2009-11-20 20:51 ` Andi Kleen
2009-11-20 20:53   ` David Miller
2009-11-20 22:30   ` Eric Dumazet
2009-11-20 22:37     ` Andi Kleen
     [not found]       ` <65634d660911201642k3930dc78vd576e0e89dc0c794@mail.gmail.com>
2009-11-21  6:58         ` Eric Dumazet
2009-11-20 20:53 ` Jarek Poplawski
2009-11-20 21:35   ` Eric Dumazet
2009-11-20 21:43     ` Joe Perches
2009-11-20 21:49       ` David Miller
2009-11-20 22:01       ` Eric Dumazet
2009-11-20 22:34     ` David Miller
2009-11-20 22:32 ` David Miller
2009-11-20 22:36   ` Eric Dumazet

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=4B06244D.9060004@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).