mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Mosberger <davidm@hpl.hp.com>
To: Jesse Barnes <jbarnes@sgi.com>
Cc: David Mosberger <davidm@hpl.hp.com>, Dan Maas <dmaas@dcine.com>,
	linux-kernel@vger.kernel.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Ben Collins <bcollins@debian.org>
Subject: Re: readl/writel and memory barriers
Date: Tue, 19 Feb 2002 11:33:22 -0800	[thread overview]
Message-ID: <15474.43138.423593.512492@napali.hpl.hp.com> (raw)
In-Reply-To: <20020219103506.A1511175@sgi.com>
In-Reply-To: <092401c1b8e7$1d190660$1a01a8c0@allyourbase> <15474.34580.625864.963930@napali.hpl.hp.com> <20020219103506.A1511175@sgi.com>

>>>>> On Tue, 19 Feb 2002 10:35:06 -0800, Jesse Barnes <jbarnes@sgi.com> said:

  Jesse> Making a variable volatile doesn't guarantee that the
  Jesse> compiler won't reorder references to it, AFAIK.  And on some
  Jesse> platforms, even uncached I/O references aren't necessarily
  Jesse> ordered.

It certainly does for on ia64-compliant system.  Check section 9.3
"Multi-threaded Code" in the "Itanium Software Conventions and Runtime
Architecture manual".

  Jesse> To avoid the overhead of having I/O flushed on every memory
  Jesse> barrier and readX/writeX operation, we've introduced mmiob()
  Jesse> on ia64, which explicity orders I/O space accesses.  Some
  Jesse> ports have chosen to take the performance hit in every
  Jesse> readX/writeX, memory barrier, and spinlock however
  Jesse> (e.g. PPC64, MIPS).

I think this is a bit of a different problem.  On non-NUMA platforms,
the performance hit of enforcing order is not huge.  Basically, as
long as the CPU issues the accesses in order, you'll be fine.

Now, with NUMA platforms, where the chipsets/switch may re-order
accesses, the performance hit will be much bigger, so the old scheme
may not be sufficient.

  Jesse> Is this a reasonable approach?  Is it acceptable to have a
  Jesse> seperate barrier operation for I/O space?  If so, perhaps
  Jesse> other archs would be willing to add mmiob() ops?

I'm no NUMA expert, but my guess is that nobody will want to go
through all the existing drivers to change them to use mmiob().  For
new drivers, it might be OK.

	--david

  parent reply	other threads:[~2002-02-19 19:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-19  1:45 Dan Maas
2002-02-19  9:31 ` Alan Cox
2002-02-19 17:10 ` David Mosberger
2002-02-19 18:35   ` Jesse Barnes
2002-02-19 20:11     ` Dan Maas
2002-02-19 20:23       ` Jesse Barnes
2002-02-19 22:05     ` Keith Owens
2002-02-19 22:17       ` Jesse Barnes
2002-02-21  0:29       ` Randy.Dunlap
2002-02-23  4:48         ` Daniel Phillips
2002-02-25 16:19           ` Randy.Dunlap
2002-02-19 19:33   ` David Mosberger [this message]
2002-02-19 19:42     ` Jesse Barnes

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=15474.43138.423593.512492@napali.hpl.hp.com \
    --to=davidm@hpl.hp.com \
    --cc=bcollins@debian.org \
    --cc=benh@kernel.crashing.org \
    --cc=dmaas@dcine.com \
    --cc=jbarnes@sgi.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®