From: David L Stevens <david.stevens@oracle.com>
To: Sowmini Varadhan <sowmini.varadhan@oracle.com>,
David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 2/2] Re-check for a VIO_DESC_READY data descriptor after short udelay()
Date: Mon, 08 Sep 2014 09:45:56 -0400 [thread overview]
Message-ID: <540DB314.3090809@oracle.com> (raw)
In-Reply-To: <20140906210253.GA5710@oracle.com>
Sowmini,
On 09/06/2014 05:02 PM, Sowmini Varadhan wrote:
> Stared at this a bit over the last two days, checked
> the documentation, discussed with dls offline - looks like
> (a) the rmb() thing was mostly a red-herring/fud
> (b) we do need the wmb()
I don't think this has anything to do with your patch, but my (new) concern with the
wmb() and no matching rmb() is this text from Documentation/memory-barrier.txt:
> SMP BARRIER PAIRING
> -------------------
>
> When dealing with CPU-CPU interactions, certain types of memory barrier should
> always be paired. A lack of appropriate pairing is almost certainly an error.
I'm no mb expert, and I know of no symptoms, but it appears to be saying that
load reordering could result in a race where the READY flag could be set with
old data in other descriptor fields due to loading them in a different order --
something it says wmb() on another CPU explicitly does not prevent.
The particular case would be adding to the ring at the same time the other side
is removing from the ring, so no locks or LDC traffic would affect it.
So, it appears to me we have a missing rmb() that is needed and I don't know what
leads you to believe it isn't.
+-DLS
next prev parent reply other threads:[~2014-09-08 13:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 16:20 [PATCH net-next v2 2/2] Re-check for a VIO_DESC_READY data descriptor after short udelay() Sowmini Varadhan
2014-09-02 16:27 ` David L Stevens
2014-09-02 16:32 ` Sowmini Varadhan
2014-09-05 5:36 ` David Miller
2014-09-05 13:47 ` Sowmini Varadhan
2014-09-06 21:02 ` Sowmini Varadhan
[not found] ` <20140907181510.GA23753@oracle.com>
2014-09-07 19:36 ` Raghuram Kothakota
2014-09-07 23:19 ` David Miller
2014-09-08 13:45 ` David L Stevens [this message]
2014-09-08 14:03 ` Sowmini Varadhan
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=540DB314.3090809@oracle.com \
--to=david.stevens@oracle.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sowmini.varadhan@oracle.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;
as well as URLs for NNTP newsgroup(s).