[PATCH 1/4] net: skb_orphan on dev_hard_start_xmit

Rusty Russell rusty at rustcorp.com.au
Mon Jun 1 08:27:28 EDT 2009

On Sat, 30 May 2009 12:41:00 am Eric Dumazet wrote:
> Rusty Russell a écrit :
> > DaveM points out that there are advantages to doing it generally (it's
> > more likely to be on same CPU than after xmit), and I couldn't find
> > any new starvation issues in simple benchmarking here.
> If really no starvations are possible at all, I really wonder why some
> guys added memory accounting to UDP flows. Maybe they dont run "simple
> benchmarks" but real apps ? :)

Well, without any accounting at all you could use quite a lot of memory as 
there are many places packets can be queued.

> For TCP, I agree your patch is a huge benefit, since its paced by remote
> ACKS and window control

I doubt that.  There'll be some cache friendliness, but I'm not sure it'll be 
measurable, let alone "huge".  It's the win to drivers which don't have a 
timely and batching tx free mechanism which I aim for.

> , but an UDP sender will likely be able to saturate
> a link.

I couldn't see any difference in saturation here (with default scheduler and an 
100MBit e1000e).  Two reasons come to mind: firstly, only the hardware queue is 
unregulated: the tx queue is still accounted.  And when you add scheduling to 
the mix, I can't in practice cause starvation of other senders.

Hope that clarifies,

More information about the libertas-dev mailing list