Re: [PATCH 1/4] scsi: megaraid_sas: use private counter for tracking inflight per-LUN commands

Ming Lei
2019-11-26T03:38:18Z

On Tue, Nov 26, 2019 at 08:42:59AM +0530, Kashyap Desai wrote:
> > > drivers/scsi/megaraid/megaraid_sas.h | 1 +
> > > drivers/scsi/megaraid/megaraid_sas_base.c | 15 +++++++++++++--
> > > drivers/scsi/megaraid/megaraid_sas_fusion.c | 13 +++++++++----
> > > 3 files changed, 23 insertions(+), 6 deletions(-)
> > >
> > Reviewed-by: Hannes Reinecke <hare@suse.de>
>
> Ming - Sorry for delay. I will update this Patch. We prefer driver to
> avoid counter for per sdev if possible. We are currently testing driver
> using below changes.
>
> inline unsigned long sdev_nr_inflight_request(struct request_queue *q) {
> struct blk_mq_hw_ctx *hctx = q->queue_hw_ctx[0]
>
> return atomic_read(&hctx->nr_active);
> }

OK, I am fine with this way, given it is just used for balancing irq load.

Thanks,
Ming