All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Higdon <jeremy@sgi.com>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: Jesse Barnes <jbarnes@engr.sgi.com>,
	James Bottomley <James.Bottomley@steeleye.com>,
	Matthew Wilcox <willy@debian.org>,
	Andrew Vasquez <andrew.vasquez@qlogic.com>,
	pj@sgi.com, SCSI Mailing List <linux-scsi@vger.kernel.org>,
	mdr@cthulhu.engr.sgi.com, jeremy@cthulhu.engr.sgi.com,
	djh@cthulhu.engr.sgi.com, Andrew Morton <akpm@osdl.org>
Subject: Re: SCSI QLA not working on latest *-mm SN2
Date: Tue, 21 Sep 2004 14:03:42 -0700	[thread overview]
Message-ID: <20040921210341.GC146363@sgi.com> (raw)
In-Reply-To: <20040921190625.GB11708@colo.lackof.org>

On Tue, Sep 21, 2004 at 01:06:25PM -0600, Grant Grundler wrote:
> On Tue, Sep 21, 2004 at 02:09:10PM -0400, Jesse Barnes wrote:
> > Grant, you say that I/O writes can't possibly arrive out of order if issued 
> > from different CPUs on any machines you're aware of?
> 
> Well, that's what I believe right now based on my experience.
> Re-reading different parts of the PCI local bus spec doesn't give
> me the warm fuzzies - especially in regard to retries.
> 
> The qla example Jeremy gave earlier wasn't clear on where the
> mmio write reordering was taking place.  Based on my understanding
> (and I've been wrong before) of ia64 .rel/.acq semantics the reordering
> didn't happen in the CPU coherency - ie writes are ordered WRT
> to each other out to the Mckinley bus. That really only leaves
> the chipset suspect - ie anything between Mckinley bus and PCI bus.

Do IO space writes follow the memory coherency rules?

> And this chipset is already known to violate DMA writes and
> MMIO read return ordering rules...which led to read_relaxed().
> We've agreed DMA reads bypassing MMIO writes violates the spec
> but is "mostly harmless" (I haven't seen a case in real life where
> it matters). HP parisc and ia64 platforms also implement
> this "optimization" (bug) and I've not seen a problem with it yet.
> 
> > If not, it may be that the API will only benefit SGI machines.
> 
> Or hurt them.
> We haven't talked about the flip side of this workaround much.
> 
> Normally, I expect the chipset is responsible for maintaining
> order of MMIO writes - though that sounds near impossible on
> a large fabric where the spinlock transactions may take a different
> path than the IO transactions. But allowing out of order MMIO
> write transactions is a big deal if we want high performance
> devices that can operate correctly by only consuming MMIO
> writes and doing DMA for everything else. Adding the MMIO
> reads to enforcing MMIO write ordering will set us all back
> a few years in terms of performance.

On Altix, we do have the sn_mmiob() option.  I don't think that
we want to Linux API to require that

CPUA:	writel(value_X, common_register)
	spin_unlock(common_lock)

CPUB:	spin_lock(common_lock)
	writel(value_Y, common_register)

be strongly ordered, because it places a performance penalty
on all writes.  On Altix, we have the "sn_mmiob()" function to do
that.  I.e.

CPUA:	writel(value_X, common_register)
	sn_mmiob()
	spin_unlock(common_lock)

CPUB:	spin_lock(common_lock)
	writel(value_Y, common_register)

would strongly order the writes.

I think the flush that Jesse was talking about was an architecture
independent abstraction of the sn_mmiob().

Note that the sn_mmiob() does not guarantee that the preceding writel is
completed -- just that there will be no other writeX issued from other
CPUs ahead of it.

However, if we lose this argument, the simple answer is to add an
sn_mmiob to the Altix platform's writeX functions.  See ___sn_outb(),
by the way.

jeremy

  parent reply	other threads:[~2004-09-21 21:04 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <B179AE41C1147041AA1121F44614F0B060EF48@AVEXCH02.qlogic.org>
     [not found] ` <20040916121235.5e4f9c32.pj@sgi.com>
     [not found]   ` <1095362263.16326.12.camel@praka>
2004-09-16 19:56     ` SCSI QLA not working on latest *-mm SN2 Paul Jackson
2004-09-16 20:05       ` Jesse Barnes
2004-09-16 20:56         ` Andrew Vasquez
2004-09-16 21:09           ` Jesse Barnes
2004-09-16 21:40             ` Andrew Vasquez
2004-09-16 22:25               ` Andrew Morton
2004-09-16 22:29                 ` Jesse Barnes
2004-09-17 17:21                   ` Jesse Barnes
2004-09-18  6:10                     ` Grant Grundler
2004-09-18 17:57                       ` Documentation/io_ordering.txt is wrong Matthew Wilcox
2004-09-20 23:39                         ` Jesse Barnes
2004-09-21  0:38                         ` Jesse Barnes
2004-09-20 22:40                       ` SCSI QLA not working on latest *-mm SN2 Jesse Barnes
2004-09-20 23:27                         ` Grant Grundler
2004-09-21  0:09                           ` Jesse Barnes
2004-09-21  5:46                             ` Grant Grundler
2004-09-21  6:45                               ` Jeremy Higdon
2004-09-21 13:29                                 ` Jesse Barnes
2004-09-21 13:25                               ` Jesse Barnes
2004-09-21 15:13                               ` Jesse Barnes
2004-09-21 15:41                                 ` James Bottomley
2004-09-21 15:58                                   ` Jesse Barnes
2004-09-21 16:01                                     ` Matthew Wilcox
2004-09-21 16:05                                       ` Jesse Barnes
2004-09-21 16:11                                         ` James Bottomley
2004-09-21 16:18                                           ` Jesse Barnes
2004-09-21 16:24                                             ` James Bottomley
2004-09-21 17:03                                           ` Jesse Barnes
2004-09-21 17:15                                             ` Matthew Wilcox
2004-09-21 17:24                                               ` Jesse Barnes
2004-09-21 17:20                                             ` James Bottomley
2004-09-21 17:46                                               ` Jesse Barnes
2004-09-21 17:56                                                 ` James Bottomley
2004-09-21 18:09                                                   ` Jesse Barnes
2004-09-21 19:06                                                     ` Grant Grundler
2004-09-21 19:40                                                       ` Jesse Barnes
2004-09-21 22:44                                                         ` Grant Grundler
2004-09-21 21:03                                                       ` Jeremy Higdon [this message]
2004-09-21 21:11                                                         ` Matthew Wilcox
2004-09-21 21:43                                                           ` Jeremy Higdon
2004-09-21 22:33                                                             ` Jesse Barnes
2004-09-22  0:02                                                             ` Matthew Wilcox
2004-09-22  1:16                                                               ` Jeremy Higdon
2004-09-22  1:44                                                                 ` Grant Grundler
2004-09-22  2:58                                                                   ` Jeremy Higdon
2004-09-22 14:32                                                                     ` I/O write ordering Matthew Wilcox
2004-09-22 14:40                                                                       ` Benjamin Herrenschmidt
2004-09-22 14:50                                                                         ` Jesse Barnes
2004-09-22 14:47                                                                       ` James Bottomley
2004-09-22 14:51                                                                         ` Benjamin Herrenschmidt
2004-09-22 15:11                                                                           ` James Bottomley
2004-09-22 15:11                                                                             ` Benjamin Herrenschmidt
2004-09-22 15:22                                                                               ` James Bottomley
2004-09-22 15:28                                                                                 ` Benjamin Herrenschmidt
2004-09-22 15:43                                                                                   ` James Bottomley
2004-09-23  0:19                                                                                     ` Benjamin Herrenschmidt
2004-09-23  1:58                                                                                       ` Matthew Wilcox
2004-09-23  3:01                                                                                         ` James Bottomley
2004-09-23  3:40                                                                                           ` Benjamin Herrenschmidt
2004-09-23  4:26                                                                                             ` Grant Grundler
2004-09-21 23:03                             ` SCSI QLA not working on latest *-mm SN2 Guennadi Liakhovetski
2004-09-16 23:14           ` Jeremy Higdon
2004-09-16 20:11       ` Andrew Morton
2004-09-21 21:22 Andrew Vasquez
2004-09-21 21:44 ` Jeremy Higdon
2004-09-21 22:37   ` Jesse Barnes
2004-09-21 22:49     ` Jeremy Higdon
  -- strict thread matches above, loose matches on Subject: below --
2004-09-21 20:50 Andrew Vasquez
2004-09-21 21:06 ` Jeremy Higdon
2004-09-21 22:36   ` Jesse Barnes
2004-09-21 22:39     ` Jeremy Higdon
2004-09-21 22:43       ` Jesse Barnes
2004-09-21 22:54         ` Jeremy Higdon
2004-09-21 23:17           ` Jesse Barnes
2004-09-22 21:33             ` Jesse Barnes
2004-09-21 17:33 Andrew Vasquez
2004-09-21 17:52 ` Jesse Barnes
2004-09-21 18:04 ` Matthew Wilcox
2004-09-21 18:59 ` Matthew Wilcox
2004-09-21 19:10   ` Jesse Barnes
2004-09-21 15:58 Andrew Vasquez
2004-09-21 16:07 ` Jesse Barnes
2004-09-21 16:25 ` Matthew Wilcox
2004-09-21 16:33   ` James Bottomley
2004-09-21 20:39     ` Jeremy Higdon
2004-09-21 20:43   ` Jeremy Higdon
2004-09-17 22:55 Andrew Vasquez
2004-09-17 23:10 ` Jesse Barnes
2004-09-17 23:55 ` James Bottomley
2004-09-18  1:15   ` Andrew Vasquez
2004-09-18  1:25     ` Matthew Wilcox
2004-09-18  1:24       ` Andrew Vasquez
2004-09-18  2:36       ` Jeremy Higdon
2004-09-18 19:12       ` James Bottomley
2004-09-15 22:51 Paul Jackson
2004-09-15 23:13 ` Andrew Morton

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=20040921210341.GC146363@sgi.com \
    --to=jeremy@sgi.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=andrew.vasquez@qlogic.com \
    --cc=djh@cthulhu.engr.sgi.com \
    --cc=grundler@parisc-linux.org \
    --cc=jbarnes@engr.sgi.com \
    --cc=jeremy@cthulhu.engr.sgi.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mdr@cthulhu.engr.sgi.com \
    --cc=pj@sgi.com \
    --cc=willy@debian.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.