linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Ming Lei <ming.lei@redhat.com>,
	linux-scsi@vger.kernel.org,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
	"Ewan D . Milne" <emilne@redhat.com>,
	Omar Sandoval <osandov@fb.com>, Christoph Hellwig <hch@lst.de>,
	Kashyap Desai <kashyap.desai@broadcom.com>,
	Hannes Reinecke <hare@suse.de>,
	Laurence Oberman <loberman@redhat.com>,
	Bart Van Assche <bart.vanassche@wdc.com>
Subject: Re: [PATCH V5] scsi: core: avoid host-wide host_busy counter for scsi_mq
Date: Fri, 1 Nov 2019 08:44:18 -0600	[thread overview]
Message-ID: <9d1e41fa-12d5-df2a-6c8e-1f9d299a6dbf@kernel.dk> (raw)
In-Reply-To: <20191025065855.6309-1-ming.lei@redhat.com>

On 10/25/19 12:58 AM, Ming Lei wrote:
> 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-wide counter in
> the IO path.
> 
> This patch implements scsi_host_busy() via blk_mq_tagset_busy_iter()
> with one scsi command state for reading the count of busy IOs for scsi_mq.
> 
> It is observed that IOPS is increased by 15% in IO test on scsi_debug (32
> LUNs, 32 submit queues, 1024 can_queue, libaio/dio) in a dual-socket
> system.
> 
> V5:
> 	- fix document on .can_queue, no code change
> 
> V4:
>          - fix one build waring, just a line change in scsi_dev_queue_ready()
> 
> V3:
>          - use non-atomic set/clear bit operations as suggested by Bart
>          - kill single field struct for storing count of in-flight requests
>          - add patch to bypass the atomic LUN-wide counter of device_busy
>          for fast SSD device
> 
> V2:
> 	- introduce SCMD_STATE_INFLIGHT for getting accurate host busy
> 	via blk_mq_tagset_busy_iter()
> 	- verified that original Jens's report[1] is fixed
> 	- verified that SCSI timeout/abort works fine
> 
> [1] https://www.spinics.net/lists/linux-scsi/msg122867.html
> [2] V1 & its revert:

Reviewed-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe


  parent reply	other threads:[~2019-11-01 14:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  6:58 Ming Lei
2019-10-31  2:25 ` Ming Lei
2019-11-01 14:44 ` Jens Axboe [this message]
2019-11-01 15:31 ` Bart Van Assche
2019-11-02  0:15 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9d1e41fa-12d5-df2a-6c8e-1f9d299a6dbf@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bart.vanassche@wdc.com \
    --cc=emilne@redhat.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@redhat.com \
    --cc=osandov@fb.com \
    --subject='Re: [PATCH V5] scsi: core: avoid host-wide host_busy counter for scsi_mq' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).