On Sat, Dec 15, 2012 at 10:40:24AM +0100, Bart Van Assche wrote: > On 12/14/12 22:06, scameron@xxxxxxxxxxxxxxxxxx wrote: > >[ ... ] how to get the scsi mid layer to provide a wide enough > >highway for requests destined for very low latency devices. > > While the SCSI mid-layer is processing an I/O request not only the > queue lock has to be locked and unlocked several times but also the > SCSI host lock. The reason that it's unavoidable to lock and unlock > the host lock is because the SCSI core has been designed for SCSI > equipment that has a queue depth limit per host (shost->can_queue). > For single LUN devices that model could be changed in a queue depth > limit per LUN. Also, it's probably not that hard to modify software > SCSI target implementations such that these have a queue depth limit > per LUN instead of per host. We'd also better avoid needing a lock to check these limits, especially if we normally don't hit them. The easiest way to get started would be to simply allow a magic can_queue value that keeps these as unlimited and only let the driver return one of the busy values from ->queuecommand. We could then use unlocked list empty checks to see if anything is in a waiting list and enter a slow path mode. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html