Re: [PATCH V2] scsi: core: avoid host-wide host_busy counter for scsi_mq

2019-10-07 Thread Ming Lei
On Mon, Oct 07, 2019 at 08:20:20PM -0700, Bart Van Assche wrote: > On 2019-10-06 00:44, Ming Lei wrote: > > +struct scsi_host_mq_in_flight { > > + int cnt; > > +}; > > Is this structure useful? Have you considered to use the 'int' datatype > directly and to leave out struct scsi_host_mq_in_fligh

Re: [PATCH V2] scsi: core: avoid host-wide host_busy counter for scsi_mq

2019-10-07 Thread Bart Van Assche
On 2019-10-06 00:44, Ming Lei wrote: > +struct scsi_host_mq_in_flight { > + int cnt; > +}; Is this structure useful? Have you considered to use the 'int' datatype directly and to leave out struct scsi_host_mq_in_flight? > /** > * scsi_host_busy - Return the host busy counter > * @shost:

[PATCH V2] scsi: core: avoid host-wide host_busy counter for scsi_mq

2019-10-06 Thread Ming Lei
It isn't necessary to check the host depth in scsi_queue_rq() any more since it has been respected by blk-mq before calling scsi_queue_rq() via getting driver tag. Lots of LUNs may attach to same host and per-host IOPS may reach millions, so we should avoid expensive atomic operations on the host-