Re: [PATCH] 2.4.x write barriers (updated for ext3)

James Bottomley
2002-02-25T15:04:53Z

helgehaf@aitel.hist.no said:
> I just wonder - isn't the amount of outstanding requests a device can
> handle constant? If so, the user could determine this (from spec or
> by running an utility that generates "too much" traffic.)

The spec doesn't make any statements about this, so the devices are allowed to
do whatever seems best. Although it is undoubtedly implemented as a fixed
queue on a few devices, there are others whose queue depth depends on the
available resources (most disk arrays function this way---they tend to juggle
tag queue depth dynamically per lun).

Even if the queue depth is fixed, you have to probe it dynamically because it
will be different for each device. Even worse, on a SAN or other shared bus,
you might not be the only initiator using the device queue, so even for a
device with a fixed queue depth you don't own all the slots so the queue depth
you see varies.

The bottom line is that you have to treat the queue full return as a normal
part of I/O flow control to SCSI devices.

James