Subject: Re: [PATCH net-next 09/14] tg3: Improve small packet performance

From: Anton Blanchard <[email-masked]>
Date: Thu, 5 Aug 2010 09:08:25 +1000

Hi,

> We generally only get an estimate of the available tx ring size when we
> call tg3_tx_avail(), so memory barriers are not generally needed.  We
> put a compiler barrier there to make sure that the compiler will fetch
> the tx_prod and tx_cons from memory to give us a better estimate.
> 
> In specific cases detailed in the patch description, we do need memory
> barriers when we call netif_tx_stop_queue() and then check for the tx
> ring.  We decided to put memory barriers exactly where they're needed
> instead of inside tg3_tx_avail() which is an overkill.

Thanks Matt and Michael. I was pretty sure you were thinking about
ordering issues but wanted to double check.

Anton