login
Header Space

 
 

Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ingo Molnar <mingo@...>
Cc: David Miller <davem@...>, <netdev@...>, <linux-kernel@...>, Peter Zijlstra <a.p.zijlstra@...>
Date: Tuesday, April 1, 2008 - 5:19 am

Ingo Molnar a =E9crit :

k=20


=20

Hi Ingo

I took the time to prepare a patch to implement =20
arch_stack_can_recurse() as you suggested.

Thank you

[PATCH] x86 : arch_stack_can_recurse() introduction

Some paths in kernel would like to chose between on-stack fast recursion =

and explicit iterators.

One identified spot is in net loopback driver, where we can avoid=20
netif_rx() and its slowdown if
sufficient stack space is available.

We introduce a generic arch_stack_can_recurse() which default to a weak=20
function returning 0.

 On x86 arch, we implement following logic :

   32 bits and 4K stacks (separate irq stacks) : can use up to 25% of sta=
ck
   64 bits, 8K stacks (separate irq stacks)    : can use up to 25% of sta=
ck
   32 bits and 8K stacks (no irq stacks)       : can use up to 50% of sta=
ck

Example of use in drivers/net/loopback.c, function  loopback_xmit()

if (arch_stack_can_recurse())
    netif_receive_skb(skb); /* immediate delivery to stack */
else
    netif_rx(skb); /* defer to softirq handling */

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead ..., Eric Dumazet, (Tue Apr 1, 5:19 am)
Re: poor network loopback performance and scalability, David Miller, (Sun Apr 20, 11:38 pm)
Re: poor network loopback performance and scalability, Ingo Molnar, (Mon Apr 21, 4:11 am)
Re: poor network loopback performance and scalability, David Miller, (Mon Apr 21, 4:16 am)
Re: poor network loopback performance and scalability, David Miller, (Mon Apr 21, 6:22 am)
speck-geostationary