Message ID | 20180124003958.3945-1-bart.vanassche@wdc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On 2018-01-23 07:39 PM, Bart Van Assche wrote: > 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 <bart.vanassche@wdc.com> > Cc: Douglas Gilbert <dgilbert@interlog.com> > Cc: Hannes Reinecke <hare@suse.com> > Cc: Christoph Hellwig <hch@lst.de> Acked: Douglas Gilbert <dgilbert@interlog.com> > --- > drivers/scsi/scsi_debug.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c > index a5986dae9020..40df3eea72c8 100644 > --- a/drivers/scsi/scsi_debug.c > +++ b/drivers/scsi/scsi_debug.c > @@ -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; > >
On Tue, Jan 23, 2018 at 04:39:58PM -0800, Bart Van Assche wrote: > 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.
On Fri, 2018-01-26 at 08:58 +0100, Christoph Hellwig wrote: > 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. Hello Christoph, Removing sdebug_mq_active sounds like a good idea to me. I will rework this patch. Bart.
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index a5986dae9020..40df3eea72c8 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -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;
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 <bart.vanassche@wdc.com> Cc: Douglas Gilbert <dgilbert@interlog.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Christoph Hellwig <hch@lst.de> --- drivers/scsi/scsi_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)