Re: SCSI QLA not working on latest *-mm SN2

Jeremy Higdon
2004-09-21T21:43:35Z

On Tue, Sep 21, 2004 at 10:11:08PM +0100, Matthew Wilcox wrote:
> On Tue, Sep 21, 2004 at 02:03:42PM -0700, Jeremy Higdon wrote:
> > 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.
>
> I disagree with you. If this were memory, then you would expect
> common_register to be set to value_Y after this sequence. Why should
> IO be different?

I/O is partially outside of the memory coherency domain. So it is
different from memory, even though we might wish that it weren't.

> > 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 your _raw_spin_unlock() should include an sn_mmiob().

That could be very painful.
On Irix, we actually had a separate spinunlock (io_spin_unlock) that
added the MIPS equivalent. I'm assuming we don't want to entertain
that here :-) (Though tell me if I'm wrong)

jeremy