[PATCH] Allow TCQ depth to be lowered properly
Ran into a couple small issues with the patch. First, blk_queue_resize_tags wasn't getting exported, so I sent Jens a patch to fix this, which he has now sent upstream. Second, the comment above blk_queue_resize_tags says the queue_lock must be held when calling this routine. Attached is an updated patch that grabs the lock. Other than that, it looks good. James Bottomley wrote: > On Tue, 2004-08-03 at 10:50, Brian King wrote: >>Currently, it is possible to call scsi_activate_tcq with a small queue depth, >>then later call scsi_adjust_queue_depth with a larger queue depth. This results >>in the scsi layer having a larger queue depth than the block layer knows about. >>This results in these additional commands being issued as untagged ops rather than >>tagged ops. This patch changes scsi_activate_tcq to call blk_queue_init_tags with >>the maximum supported number of tags so this cannot occur. > > > Sorry, been away at conferences with not enough time to remember what > went on here. > > The reason it looks the way it does is historical...when the blk layer > tcq interfaces were created, there was no way to resize the queue. Jens > later added resize (for me) and I forgot to incorporate it into the > code. > > Another small point is that the max number of tags can be greater than > 256. 256 is a SPI limit only (and even the qla1280, a SPI card which > could use the tag as its global queue index would take > 256). The > limit in scsi_adjust_queue_depth has long since been obsoleted by our > dynamic command allocation. > > I think the attached should work correctly (as long as it compiles...I > coded it up on the flight home). Signed-off-by: Brian King <brking@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Showing
Please register or sign in to comment