From: Scott Wood <scottwood@freescale.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: netdev@vger.kernel.org, jgarzik@pobox.com, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] gianfar: Add I/O barriers when touching buffer descriptor ownership.
Date: Wed, 02 May 2007 11:04:03 -0500 [thread overview]
Message-ID: <4638B673.4090504@freescale.com> (raw)
In-Reply-To: <65f0b79871a670eb595cca7d78e2f4e9@kernel.crashing.org>
Segher Boessenkool wrote:
>> The hardware must not see that is given ownership of a buffer until it is
>> completely written, and when the driver receives ownership of a buffer,
>> it must ensure that any other reads to the buffer reflect its final
>> state. Thus, I/O barriers are added where required.
>>
>> Without this patch, I have observed GCC reordering the setting of
>> bdp->length and bdp->status in gfar_new_skb.
>
>
> The :::"memory" in the barriers you used prevent GCC
> from reordering accesses around the barriers.
Sure... it was just an example to point out that it's actually
happening, rather than a theoretical concern.
> AFAICS you need stronger barriers though; {w,r,}mb(),
> to prevent _any_ reordering of those memory accesses,
> not just the compiler-generated ones.
My impression was that the eieio used by iobarrier would be sufficient
for that, as we're not trying to synchronize between accesses to
different types of memory. Is sync really required here?
-Scott
next prev parent reply other threads:[~2007-05-02 16:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 16:55 [PATCH] gianfar: Add I/O barriers when touching buffer descriptor ownership Scott Wood
2007-05-02 0:54 ` Segher Boessenkool
2007-05-02 16:04 ` Scott Wood [this message]
2007-05-02 18:05 ` Segher Boessenkool
-- strict thread matches above, loose matches on Subject: below --
2007-05-16 20:06 Scott Wood
2007-05-18 0:45 ` Jeff Garzik
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=4638B673.4090504@freescale.com \
--to=scottwood@freescale.com \
--cc=jgarzik@pobox.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=segher@kernel.crashing.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 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).