Subject: Re: WD7000
To: None <>
From: Charles Hannum <>
List: tech-kern
Date: 01/04/1996 20:16:07
[Forwarding this to tech-kern, as other people may want to comment.]

   I have a 
   question about the scsi system in general: Do SCSI requests due to file 
   system activity always have SCSI_NOSLEEP set?

Any activity with an associated buffer will have SCSI_NOSLEEP set.
This is because after the strategy routine queues a transfer, the
low-level driver may (and frequently will) be called from a context
where it is inappropriate to sleep.  If the low-level driver detects
that it is out of resources and returns TRY_AGAIN_LATER, the mid-level
code will retry a second later.  If there is enough contention, it
will time out.

There's probably a better way to handle this, but I haven't thought
about it much.  Perhaps a call down from the strategy routine to
allocate the resources that the low-level driver will need; that way
we can sleep inside the strategy routine, which is safe.  It looks
like we could toast SCSI_NOSLEEP completely.

If you have any suggestions, feel free to send them.