From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199610271911.OAA13497@sub2317.jic.com> Date: Sun, 27 Oct 1996 14:11:27 -0500 From: Eric Youngdale Subject: Re: SCSI driver times out on UDB? >Well, actually, not quite true. The key issue here is that the >two machines have to have different initiator IDs. Even non-tagged >q'ing capable devices can keep track of different (single) commands >from different initiators. There are notable buggy implementations >of this (for example, the old CDC Wren IV, would get confused over >which command came from which initiator). This part of it would work, but the scenario that I had in mind was something that even can come up with single initiator machines. Consider a block read request for sectors 100000-100010, followed by a block read request for sector 0, and then a bunch more reads for sectors near 100000. The devices are capable of reordering requests, and thus the read for sector 0 could keep getting deferred as long as requests around 100000 keep coming in. Eventually the request at block 0 times out, and this causes a problem. In the single initiator case, the device driver can detect this situation, and simply tell the device to complete all previous outstanding commands before starting the next one (i.e. the Buslogic driver does this. See Buslogic.c:2560 for example). In the multi-initiator case, the problem is a bit more complicated. You can have a similar situation but if the read from block 0 comes from machine A and the rest from machine B, then all machine A knows is that a single command is timing out, but it doesn't know why. Since that host isn't issuing any more commands, it cannot use the same strategy that the Buslogic driver does (i.e. it cannot force an Ordered Queue Tag on the next request), and we cannot count upon machine B to even notice that anything is amiss. The ultimate solution is that the error detection/recovery system needs to be redone anyways. It needs to be made tagged queueing aware so that it works better for these cases. It may be capable of handling a case like what I have described, but I still am unsure what an appropriate stragegy to detect and deal with the above case would be. There is probably some command that could be forced out there to order the queues, but ideally the strategy would depend upon whether or not the device/system has multiple initiators or not. >Yes, I ran into this case, which is why sent the patch to the AIC7770 list- >a change made in August broke that which had been a pretty multi-initiator >environment for some time (bouncing BUSY conditions (setting DID_ERROR) >instead of letting them retry). Yes, for a 0th order solution, this would seem like a reasonable thing to do. >I've certainly done the latter, but it really isn't necessary to do the >former when you have a stable system that: > > a) Has patchable timeouts (fixed compile time timeouts are a bad > idea- any number that you pick will certainly be wrong in the future). I know. This is something which could in principle be set on a device by device basis. Doing something via the /proc filesystem would be the easiest way to do this, I guess. To me this has the feel of a band-aid, but it would alleviate the immediate problem. > b) Truly handles command timeouts, with increasing backoff. > >Even with the above being not entirely the case, I've made a pretty >stable multi-initiator system (with the latest && greatest, after I >fixed the aic 'fixes'). I ran for a 4 hour burn in beating the >crap of the same disk from both systems. I think everyone agrees that timeout handling definitely needs to be rethought and redone. I didn't realize it when I first got into SCSI, but that is probably the hardest part of the whole thing, especially when you have so many different types of drivers out there, so many different types of peripherals. I had the misfourtune of starting out with a 1542, for which there are really very few effective strategies for dealing with hung devices or busses. >No. No. No. RESERVE/RELEASE is not the answer. You'd have to do it on >a per-command basis if you're actually sharing peripherals completely. >RESERVE/RELEASE is only really for the HA/Cluster type systems, and even I know, I know. I said I didn't like the idea myself :-). My main objection is the additional overhead of putting those commands on the bus, and as you say, you would have to use it for each and every command that goes out. Another SCSI-1 feature that sounded good when they first came up with it.... -Eric -- To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null