scsi_debug: Use scsi-mq if it has been enabled
PATCH 1/1 scsi_debug: Use scsi-mq if it has been enabled
Since we want to remove the single queue code from the SCSI core at the appropriate time and since scsi-mq performs better than scsi-sq even when using only a single hardware queue, use scsi-mq if it has been enabled.
--- drivers/scsi/scsi_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_debug.c +1 -1
@@ -5782,7 +5782,7 @@ static int sdebug_driver_probe(struct device * dev) }/* Decide whether to tell scsi subsystem that we want mq */ /* Following should give the same answer for each host */ - sdebug_mq_active =shost_use_blk_mq (hpnt) && (submit_queues >1 ); + sdebug_mq_active =shost_use_blk_mq (hpnt);if (sdebug_mq_active) hpnt->nr_hw_queues = submit_queues;
Signature · 1 line
2.15.1
Quoted 9 lines · Bart Van Assche
Since we want to remove the single queue code from the SCSI core at the appropriate time and since scsi-mq performs better than scsi-sq even when using only a single hardware queue, use scsi-mq if it has been enabled.
Signed-off-by Bart Van Assche <[email protected]>Cc Douglas Gilbert <[email protected]>Cc Hannes Reinecke <[email protected]>Cc Christoph Hellwig <[email protected]>
Acked: Douglas Gilbert <[email protected]>
Quoted 18 lines
--- drivers/scsi/scsi_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/scsi_debug.c +1
-1@@ -5782,7 +5782,7 @@ static int sdebug_driver_probe(struct device * dev) }/* Decide whether to tell scsi subsystem that we want mq */ /* Following should give the same answer for each host */ - sdebug_mq_active =shost_use_blk_mq (hpnt) && (submit_queues >1 ); + sdebug_mq_active =shost_use_blk_mq (hpnt);if (sdebug_mq_active) hpnt->nr_hw_queues = submit_queues;
Quoted 4 lines · Bart Van Assche
Since we want to remove the single queue code from the SCSI core at the appropriate time and since scsi-mq performs better than scsi-sq even when using only a single hardware queue, use scsi-mq if it has been enabled.
scsi_debug already always uses scsi-mq if enabled. The somewhat misnamed sdebug_mq_active variable is only used for decoding multiqueue tags. That being said the blk_mq_unique_tag* helpers should be safe to use even without blk-mq, so the variable could probably just be removed entirely.
Quoted 5 lines · Christoph Hellwig
scsi_debugalready always uses scsi-mq if enabled. The somewhat misnamedsdebug_mq_activevariable is only used for decoding multiqueue tags. That being said the blk_mq_unique_tag* helpers should be safe to use even without blk-mq, so the variable could probably just be removed entirely.
Hello Christoph,
Removing sdebug_mq_active sounds like a good idea to me. I will rework this patch.
Bart.