All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Bart Van Assche <Bart.VanAssche@wdc.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"snitzer@redhat.com" <snitzer@redhat.com>,
	"hch@lst.de" <hch@lst.de>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"hare@suse.de" <hare@suse.de>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"don.brace@microsemi.com" <don.brace@microsemi.com>,
	"james.bottomley@hansenpartnership.com"
	<james.bottomley@hansenpartnership.com>,
	"osandov@fb.com" <osandov@fb.com>,
	"loberman@redhat.com" <loberman@redhat.com>,
	"kashyap.desai@broadcom.com" <kashyap.desai@broadcom.com>
Subject: Re: [PATCH 0/3] scsi: scsi-mq: don't hold host_busy in IO path
Date: Sat, 28 Apr 2018 16:47:28 +0800	[thread overview]
Message-ID: <20180428084726.GC7325@ming.t460p> (raw)
In-Reply-To: <607c4d2f-28e7-4152-dbf5-7fb4387e9413@kernel.dk>

On Fri, Apr 27, 2018 at 09:39:47AM -0600, Jens Axboe wrote:
> On 4/27/18 9:31 AM, Bart Van Assche wrote:
> > On Fri, 2018-04-20 at 14:57 +0800, Ming Lei wrote:
> >> This patches removes the expensive atomic opeation on host-wide counter
> >> of .host_busy for scsi-mq, and it is observed that IOPS can be increased by
> >> 15% with this change in IO test over scsi_debug.
> >>
> >>
> >> Ming Lei (3):
> >>   scsi: introduce scsi_host_busy()
> >>   scsi: read host_busy via scsi_host_busy()
> >>   scsi: avoid to hold host-wide counter of host_busy for scsi_mq
> >>
> >>  drivers/scsi/advansys.c                   |  8 ++++----
> >>  drivers/scsi/hosts.c                      | 32 +++++++++++++++++++++++++++++++
> >>  drivers/scsi/libsas/sas_scsi_host.c       |  4 ++--
> >>  drivers/scsi/megaraid/megaraid_sas_base.c |  2 +-
> >>  drivers/scsi/mpt3sas/mpt3sas_base.c       |  4 ++--
> >>  drivers/scsi/qlogicpti.c                  |  2 +-
> >>  drivers/scsi/scsi.c                       |  2 +-
> >>  drivers/scsi/scsi_error.c                 |  6 +++---
> >>  drivers/scsi/scsi_lib.c                   | 23 ++++++++++++++++------
> >>  drivers/scsi/scsi_sysfs.c                 |  2 +-
> >>  include/scsi/scsi_host.h                  |  1 +
> >>  11 files changed, 65 insertions(+), 21 deletions(-)\
> > 
> > Hello Ming,
> > 
> > From the MAINTAINERS file:
> > 
> > SCSI SUBSYSTEM
> > M:      "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
> > T:      git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
> > M:      "Martin K. Petersen" <martin.petersen@oracle.com>
> > T:      git git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
> > L:      linux-scsi@vger.kernel.org
> > S:      Maintained
> > F:      Documentation/devicetree/bindings/scsi/
> > F:      drivers/scsi/
> > F:      include/scsi/
> > 
> > Hence my surprise when I saw that you sent this patch series to Jens instead
> > of James and Martin?
> 
> Martin and James are both on the CC as well. For what it's worth, the patch
> seems like a good approach to me. To handle the case that Hannes was concerned
> about (older drivers doing internal command issue), I would suggest that those
> drivers get instrumented to include a inc/dec of the host busy count for
> internal commands that bypass the normal tagging. That means the mq case needs
> to be
> 
> blk_mq_tagset_busy_iter(&shost->tag_set, scsi_host_check_in_flight,
> 			&in_flight);
> return in_flight.cnt + atomic_read(&shost->host_busy);
> 
> The atomic read is basically free, once we get rid of the dirty of that
> variable on each IO.

Actually the internal command isn't submitted via normal IO path, then
it won't be completed via the normal completion path(soft_irq_done, or
.timeout), so handling internal command doesn't touch the scsi generic
counter of .host_busy.

I have talked with Hannes a bit about this at LSFMM, looks he agreed too.

Thanks,
Ming

  parent reply	other threads:[~2018-04-28  8:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20  6:57 [PATCH 0/3] scsi: scsi-mq: don't hold host_busy in IO path Ming Lei
2018-04-20  6:57 ` [PATCH 1/3] scsi: introduce scsi_host_busy() Ming Lei
2018-04-27 15:47   ` Bart Van Assche
2018-04-20  6:57 ` [PATCH 2/3] scsi: read host_busy via scsi_host_busy() Ming Lei
2018-04-27 15:51   ` Bart Van Assche
2018-04-28  8:17     ` Ming Lei
2018-04-20  6:57 ` [PATCH 3/3] scsi: avoid to hold host-wide counter of host_busy for scsi_mq Ming Lei
2018-04-27 16:16   ` Bart Van Assche
2018-04-28  8:26     ` Ming Lei
2018-04-27 15:31 ` [PATCH 0/3] scsi: scsi-mq: don't hold host_busy in IO path Bart Van Assche
2018-04-27 15:39   ` Jens Axboe
2018-04-27 15:48     ` Bart Van Assche
2018-04-27 15:55       ` Laurence Oberman
2018-04-27 16:19       ` Jens Axboe
2018-04-28  8:47     ` Ming Lei [this message]
2018-06-22 15:29 ` Bart Van Assche
2018-06-22 21:43   ` Ming Lei

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=20180428084726.GC7325@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=don.brace@microsemi.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=martin.petersen@oracle.com \
    --cc=osandov@fb.com \
    --cc=snitzer@redhat.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.