]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
hpsa: honor queue depth of physical devices
authorDon Brace <don.brace@pmcs.com>
Fri, 23 Jan 2015 22:43:30 +0000 (16:43 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 2 Feb 2015 17:57:40 +0000 (09:57 -0800)
commit03383736348bb73a45f8460afca3c5f5bd1be172
treebd4d9b4450027d3f9f4f259d60c000558a68d7f4
parent080ef1cc7fdf5d0800775c8626718da807e7ba99
hpsa: honor queue depth of physical devices

When using the ioaccel submission methods, requests destined for RAID volumes
are sometimes diverted to physical devices.  The OS has no or limited
knowledge of these physical devices, so it is up to the driver to avoid
pushing the device too hard.  It is better to honor the physical device queue
limit rather than making the device spew zillions of TASK SET FULL responses.

This is so that hpsa based devices support /sys/block/sdNN/device/queue_type
of simple, which lets the SCSI midlayer automatically adjust the queue_depth
based on TASK SET FULL and GOOD status.

Adjust the queue depth for a new device after it is created based on the
maximum queue depths of the physical devices that constitute the
device. This drops the maximum queue depth from .can_queue of 1024 to
something like 174 for single-drive RAID-0, 348 for two-drive RAID-1, etc.
It also adjusts for the ratio of data to parity drives.

Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Signed-off-by: Webb Scales <webbnh@hp.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/hpsa.c
drivers/scsi/hpsa.h
drivers/scsi/hpsa_cmd.h