From: Ben Hutchings <bhutchings@solarflare.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Erwan Velu <erwanaliasr1@gmail.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <tshimizu818@gmail.com>
Subject: RE: [PATCH] pch_gbe: Adding read memory barriers
Date: Wed, 9 May 2012 14:18:30 +0100 [thread overview]
Message-ID: <1336569510.8274.360.camel@deadeye> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F602CD83CB@saturn3.aculab.com>
On Wed, 2012-05-09 at 11:47 +0100, David Laight wrote:
> > Under a strong incoming packet stream and/or high cpu usage,
> > the pch_gbe driver reports "Receive CRC Error" and discards packet.
> >
> > It occurred on an Intel ATOM E620T while running a
> > 300mbit/sec multicast
> > network stream leading to a ~100% cpu usage.
> >
> > Adding rmb() calls before considering the network card's status solve
> > this issue.
> >
> > Getting it into stable would be perfect as it solves
> > reliability issues.
> >
> > Signed-off-by: Erwan Velu <erwan.velu@zodiacaerospace.com>
> > ---
> > .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 3 +++
> > 1 files changed, 3 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> > b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> > index 8035e5f..ace3654 100644
> > --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> > +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> > @@ -1413,6 +1413,7 @@ static irqreturn_t pch_gbe_intr(int
> > irq, void *data)
> > pch_gbe_mac_set_pause_packet(hw);
> > }
> > }
> > + smp_rmb(); /* prevent any other reads before*/
>
> Under the assumption that your memory references are uncached,
> you only need to stop gcc reordering the object code,
> Rather than actually adding one of the 'fence' instructions.
Also, the usual MMIO functions already include compiler barriers.
> So you should only need: asm volatile(:::"memory")
> NFI which define generates that, the defines in the copy of
> sysdep.h I just looked at always include one of the fences.
This is barrier(). But I think this must be intended to control
ordering of fields that are written elsewhere.
Really, this needs a much more specific comment to explain the intent.
Then reviewers can work out whether it actually achieves the intent!
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2012-05-09 13:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 19:30 [PATCH] pch_gbe: Adding read memory barriers Erwan Velu
2012-05-08 18:35 ` Erwan Velu
2012-05-08 18:39 ` David Miller
2012-05-08 19:27 ` Erwan Velu
2012-05-09 10:47 ` David Laight
2012-05-09 13:18 ` Ben Hutchings [this message]
[not found] ` <CAL2JzuxirjAnmbcV+R=MJFAi1+ayrRnM6i0Dz5poqMuG7Cxwxg@mail.gmail.com>
2012-05-09 14:44 ` David Laight
[not found] ` <CAL2JzuxawnesC+=Fqyu71Hkwi5gnRughe_NYM4k1c=zqDoNGRg@mail.gmail.com>
2012-05-09 15:39 ` Ben Hutchings
-- strict thread matches above, loose matches on Subject: below --
2012-05-07 17:49 Erwan Velu
2012-05-07 17:57 ` David Miller
2012-05-07 17:39 Erwan Velu
2012-05-07 17:44 ` David Miller
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=1336569510.8274.360.camel@deadeye \
--to=bhutchings@solarflare.com \
--cc=David.Laight@ACULAB.COM \
--cc=erwanaliasr1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tshimizu818@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox