Subject: Re: [PATCH] sky2: skb recycling

From: Stephen Hemminger <[email-masked]>
Date: Tue, 21 Oct 2008 08:09:50 -0700

On Tue, 21 Oct 2008 07:54:18 +0200
Eric Dumazet <[email-masked]> wrote:

> Stephen Hemminger a écrit :
> > Add support for recycling tx buffers into receive buffers.
> > This is experimental at this point.
> > 
> 
> I really like this skb recycling
> 
> For best performance, driver should perform TX completion before RX completion, so that
> freshly added skb in recycle queue have a chance being reused right after. Apparently sky2
> tx handling is finegrained (events posted by NIC)

The NIC always reports TX completion after RX, so recycling doesn't work that well.

> But still, this mechanism also use more skbs per device, especially on dormant ones.
> 
> If your RX ring has 256 skb, then adding the recycle queue can adds 256 more skbs... One MB or event more...
> 
> Maybe we should flush the recycle queue, every 5 seconds or so, especially if device is dormant
> (no RX on it, litle heartbeat TX)

I think dropping the recycle queue down to the typical max number of receive frames per interrupt
which is between 4 and 16 would be enough.