From: "Bryan O'Sullivan" <bos@pathscale.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: akpm@osdl.org, ak@suse.de, paulus@samba.org, bcrl@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Define flush_wc, a way to flush write combining store buffers
Date: Wed, 08 Mar 2006 17:48:18 -0800 [thread overview]
Message-ID: <1141868898.6721.20.camel@localhost.localdomain> (raw)
In-Reply-To: <1141861230.11221.189.camel@localhost.localdomain>
On Thu, 2006-03-09 at 10:40 +1100, Benjamin Herrenschmidt wrote:
> What bothers me is that because of that exact same argument "it makes
> substantial difference for us", we end up with basically barriers
> tailored for architectures... that is as many kind of barriers as we
> have architectuers... like mmiowb :)
Unfortunately, it does express an untidy facet of reality, which is that
you really *do* want about as many different kinds of barrier as you
have kinds of distinct semantics, so that you have some hope of
expressing fairly portable concepts in a somewhat high-performance way.
I can see four problems at hand. You can choose the order of their
importance yourself :-)
1. Linux has a set of barriers that is too small to write
performant code in a portable manner.
2. The semantics of the existing barriers are not well understood.
3. People don't understand when barriers are appropriate in the
first place. Witness the current thread on this topic.
4. If you add more subtle barriers, they'll get misused (see #3)
and inevitably introduce bugs that are a nightmare to find.
Regarding #2, it's not obvious to lots of people why e.g. the
atomic_*_return kinds of routines need to have memory barrier semantics,
in some cases even after reading Documentation/atomic_ops.txt. So this
is a nasty education problem.
Regardless, in the case of the ipath driver, we squeeze every cycle out
of the hardware that we can, and this is our selling point. I'm fine
with a driver-specific hack in this case because it suits my immediate
needs, but it would be nice to have something portable and well-defined
to rely on.
<b
next prev parent reply other threads:[~2006-03-09 1:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-08 21:31 [PATCH] Define flush_wc, a way to flush write combining store buffers Bryan O'Sullivan
2006-03-08 21:38 ` Benjamin Herrenschmidt
2006-03-08 21:37 ` Benjamin LaHaise
2006-03-08 21:43 ` Bryan O'Sullivan
2006-03-08 14:21 ` Andi Kleen
2006-03-08 21:57 ` Bryan O'Sullivan
2006-03-08 14:38 ` Andi Kleen
2006-03-09 1:26 ` Bryan O'Sullivan
2006-03-08 23:40 ` Benjamin Herrenschmidt
2006-03-09 1:48 ` Bryan O'Sullivan [this message]
2006-03-08 22:06 ` Alan Cox
2006-03-08 14:35 ` Andi Kleen
2006-03-08 22:05 ` Bryan O'Sullivan
2006-03-08 14:40 ` Andi Kleen
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=1141868898.6721.20.camel@localhost.localdomain \
--to=bos@pathscale.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=bcrl@kvack.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.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