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

Jesse Barnes
2004-09-21T13:29:35Z

On Tuesday, September 21, 2004 2:45 am, Jeremy Higdon wrote:
> It was my understanding that this could be a problem on any
> MP machine where the CPUs use a write buffer (which is just
> about everything today).
>
> The question seems to be whether release semantics (or equivalent
> on other chips) in the IA64 apply to MMIO writes. I believe that
> they do not. It seems that you think that it does.

I think it's even more subtle than that. Stores with release semantics will
be visible on other CPUs if they're written to cacheable space, but in the
case of MMIO writes, it's the local receiving Hub that can cause the problem.
It'll try to send the PIO along to its destination Hub as soon as possible,
but due to congestion, credit counts, etc., the write may be delayed and
occur *after* a write from another CPU whose Hub is closer. But then again,
I could be confused.

> On Altix, we ran into a problem with the qla1280 driver (see
> version 1.56 in the scsi-misc-2.6 bk tree) because the spinunlock
> (apparently) did not imply a retirement of a previous mmio write.
> In that rev, I added an mmio read to so that the mmio write would
> be completed before releasing the spinlock (I believe the host
> lock held during the call to queuecommand).
>
> Before making that change, the problem was the two different CPUs
> would mmio write to the Request In register, and the ordering
> would flip, causing the qla1280 to think that it suddenly had
> an entire request queue. We didn't see this problem on puny
> 64p machines (at least not under ordinary stress testing); we
> needed a 512p machine to see it, though odds are that it would
> have occurred very occasionally on smaller machines.

Good example, thanks for reminding me.

Jesse