public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba•org>
To: Michael Chan <mchan@broadcom•com>
Cc: Matthew Carlson <mcarlson@broadcom•com>,
	"davem@davemloft•net" <davem@davemloft•net>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"andy@greyhouse•net" <andy@greyhouse•net>
Subject: Re: [PATCH net-next 09/14] tg3: Improve small packet performance
Date: Thu, 5 Aug 2010 09:08:25 +1000	[thread overview]
Message-ID: <20100804230825.GQ29316@kryten> (raw)
In-Reply-To: <1280962049.7554.25.camel@HP1>

 
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

      reply	other threads:[~2010-08-04 23:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-02 21:26 [PATCH net-next 09/14] tg3: Improve small packet performance Matt Carlson
2010-08-04 22:27 ` Anton Blanchard
2010-08-04 22:46   ` Matt Carlson
2010-08-04 22:47   ` Michael Chan
2010-08-04 23:08     ` Anton Blanchard [this message]

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=20100804230825.GQ29316@kryten \
    --to=anton@samba$(echo .)org \
    --cc=andy@greyhouse$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=mcarlson@broadcom$(echo .)com \
    --cc=mchan@broadcom$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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