From: Anton Blanchard <anton@samba.org>
To: Matt Carlson <mcarlson@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, andy@greyhouse.net,
Michael Chan <mchan@broadcom.com>
Subject: Re: [PATCH net-next 09/14] tg3: Improve small packet performance
Date: Thu, 5 Aug 2010 08:27:41 +1000 [thread overview]
Message-ID: <20100804222741.GA18708@kryten> (raw)
In-Reply-To: <1280784368-4226-9-git-send-email-mcarlson@broadcom.com>
Hi,
Just saw this go in:
> static inline u32 tg3_tx_avail(struct tg3_napi *tnapi)
> {
> - smp_mb();
> + /* Tell compiler to fetch tx indices from memory. */
> + barrier();
> return tnapi->tx_pending -
> ((tnapi->tx_prod - tnapi->tx_cons) & (TG3_TX_RING_SIZE - 1));
> }
Which worries me. Are we sure we don't need any ordering (eg smp_rmb)?
A compiler barrier does nothing to ensure two loads are ordered.
Anton
next prev parent reply other threads:[~2010-08-04 22:32 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 [this message]
2010-08-04 22:46 ` Matt Carlson
2010-08-04 22:47 ` Michael Chan
2010-08-04 23:08 ` Anton Blanchard
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=20100804222741.GA18708@kryten \
--to=anton@samba.org \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=mcarlson@broadcom.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.