From: Paolo Bonzini <pbonzini@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: jejb@linux.ibm.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org, stefanha@redhat.com
Subject: Re: [PATCH 1/2] scsi_host: add support for request batching
Date: Fri, 31 May 2019 11:12:20 +0200 [thread overview]
Message-ID: <dd00ef94-1d28-1401-2375-7603e9543e2d@redhat.com> (raw)
In-Reply-To: <740d2f33-004e-7a37-1f6e-cf29480439b1@acm.org>
On 30/05/19 19:54, Bart Van Assche wrote:
> As far as I can see the only impact of defining an empty commit_rqs
> callback on the queueing behavior is that blk_mq_make_request() will
> queue requests for multiple hwqs on the plug list instead of requests
> for a single hwq. The plug list is sorted by hwq before it is submitted
> to a block driver. If that helps NVMe performance it should also help
> SCSI performance.
See the comment in blk_mq_make_request(): sorting by hwq helps NVMe
because it uses bd->last, and blk_mq_make_request() uses the presence of
the ->commit_rqs() as a sign that the driver uses bd->last. The
heuristic basically trades latency (with plugging, the driver rings the
doorbell a bit later) for throughput (ringing the doorbell is slow, so
we want to do it less). If the driver doesn't use bd->last and the
doorbell is always rung, plugging adds to the latency without the
throughput benefit.
All that the duplicate blk_mq_ops do is letting blk_mq_make_request()
use the same heuristic for SCSI. This should be beneficial exactly for
the reason that you mention: if the heuristic helps non-SCSI block
driver performance, it should also help performance of SCSI drivers that
have nr_hw_queues > 1 but no commit_rqs (lpfc, qedi, qla2xxx, smartpqi,
storvsc).
Paolo
> How about always setting commit_rqs = scsi_commit_rqs
> in scsi_mq_ops?
next prev parent reply other threads:[~2019-05-31 9:12 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 11:28 [PATCH 0/2] scsi: add support for request batching Paolo Bonzini
2019-05-30 11:28 ` [PATCH 1/2] scsi_host: " Paolo Bonzini
2019-05-30 15:36 ` Bart Van Assche
2019-05-30 15:54 ` Paolo Bonzini
2019-05-30 17:54 ` Bart Van Assche
2019-05-31 9:12 ` Paolo Bonzini [this message]
2019-05-31 3:27 ` Ming Lei
2019-06-03 8:16 ` Paolo Bonzini
2019-07-05 1:00 ` Ming Lei
2019-06-04 22:40 ` Bart Van Assche
2019-06-19 8:11 ` Hannes Reinecke
2019-06-19 10:31 ` Paolo Bonzini
2019-07-04 13:19 ` Paolo Bonzini
2019-07-05 7:12 ` Hannes Reinecke
2019-07-05 7:44 ` Stefan Hajnoczi
2019-07-05 7:51 ` Hannes Reinecke
2019-05-30 11:28 ` [PATCH 2/2] virtio_scsi: implement " Paolo Bonzini
2019-05-30 17:28 ` Bart Van Assche
2019-05-31 9:03 ` Paolo Bonzini
2019-07-05 7:52 ` Hannes Reinecke
2019-07-08 9:47 ` Ming Lei
2019-06-10 12:36 ` [PATCH 0/2] scsi: add support for " Stefan Hajnoczi
2019-06-26 13:51 ` Paolo Bonzini
2019-06-26 14:14 ` Douglas Gilbert
2019-06-26 14:50 ` Paolo Bonzini
2019-06-27 3:37 ` Martin K. Petersen
2019-06-27 8:17 ` Paolo Bonzini
2019-07-05 7:13 ` Hannes Reinecke
2019-07-05 11:58 ` Paolo Bonzini
2019-07-12 1:37 ` 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=dd00ef94-1d28-1401-2375-7603e9543e2d@redhat.com \
--to=pbonzini@redhat.com \
--cc=bvanassche@acm.org \
--cc=jejb@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=stefanha@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 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).