qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Wei Li <wei.d.li@oracle.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	Dongli Zhang <dongli.zhang@oracle.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Following up questions related to QEMU and I/O Thread
Date: Mon, 29 Apr 2019 09:40:48 -0400	[thread overview]
Message-ID: <20190429134048.GH7587@stefanha-x1.localdomain> (raw)
In-Reply-To: <44520476-d6a8-2e3f-1602-388e2e1e874e@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

On Fri, Apr 26, 2019 at 10:14:16AM +0200, Paolo Bonzini wrote:
> On 23/04/19 14:04, Stefan Hajnoczi wrote:
> >> In addition, does Virtio-scsi support Batch I/O Submission feature
> >> which may be able to increase the IOPS via reducing the number of
> >> system calls?
> >
> > I don't see obvious batching support in drivers/scsi/virtio_scsi.c.
> > The Linux block layer supports batching but I'm not sure if the SCSI
> > layer does.
> 
> I think he's referring to QEMU, in which case yes, virtio-scsi does
> batch I/O submission.  See virtio_scsi_handle_cmd_req_prepare and
> virtio_scsi_handle_cmd_req_submit in hw/scsi/virtio-scsi.c, they do
> blk_io_plug and blk_io_unplug in order to batch I/O requests from QEMU
> to the host kernel.

This isn't fully effective since the guest driver kicks once per
request.  Therefore QEMU-level batching you mentioned only works if QEMU
is slower at handling virtqueue kicks than the guest is at submitting
requests.

I wonder if this is something that can be improved.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	Wei Li <wei.d.li@oracle.com>,
	qemu-devel@nongnu.org, Dongli Zhang <dongli.zhang@oracle.com>
Subject: Re: [Qemu-devel] Following up questions related to QEMU and I/O Thread
Date: Mon, 29 Apr 2019 09:40:48 -0400	[thread overview]
Message-ID: <20190429134048.GH7587@stefanha-x1.localdomain> (raw)
Message-ID: <20190429134048.wDqAVkk3BYmMTIFNh2ulzrhP4FSC1iB_daphsDg3eL8@z> (raw)
In-Reply-To: <44520476-d6a8-2e3f-1602-388e2e1e874e@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

On Fri, Apr 26, 2019 at 10:14:16AM +0200, Paolo Bonzini wrote:
> On 23/04/19 14:04, Stefan Hajnoczi wrote:
> >> In addition, does Virtio-scsi support Batch I/O Submission feature
> >> which may be able to increase the IOPS via reducing the number of
> >> system calls?
> >
> > I don't see obvious batching support in drivers/scsi/virtio_scsi.c.
> > The Linux block layer supports batching but I'm not sure if the SCSI
> > layer does.
> 
> I think he's referring to QEMU, in which case yes, virtio-scsi does
> batch I/O submission.  See virtio_scsi_handle_cmd_req_prepare and
> virtio_scsi_handle_cmd_req_submit in hw/scsi/virtio-scsi.c, they do
> blk_io_plug and blk_io_unplug in order to batch I/O requests from QEMU
> to the host kernel.

This isn't fully effective since the guest driver kicks once per
request.  Therefore QEMU-level batching you mentioned only works if QEMU
is slower at handling virtqueue kicks than the guest is at submitting
requests.

I wonder if this is something that can be improved.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  parent reply	other threads:[~2019-04-29 13:40 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 17:33 [Qemu-devel] Following up questions related to QEMU and I/O Thread Wei Li
2019-03-05 17:29 ` Stefan Hajnoczi
     [not found]   ` <2D7F11D0-4A02-4A0F-961D-854240376B17@oracle.com>
2019-04-01  9:07     ` Stefan Hajnoczi
2019-04-05 21:09       ` Wei Li
2019-04-05 21:09         ` Wei Li
2019-04-16 14:01         ` Paolo Bonzini
2019-04-16 14:01           ` Paolo Bonzini
2019-04-17  1:38           ` Wei Li
2019-04-17  1:38             ` Wei Li
2019-04-17 12:17             ` Paolo Bonzini
2019-04-17 12:17               ` Paolo Bonzini
2019-04-18  3:34               ` Wei Li
2019-04-18  3:34                 ` Wei Li
     [not found]       ` <CC372DF3-1AC6-46B5-98A5-21159497034A@oracle.com>
2019-04-15 17:34         ` Wei Li
2019-04-15 17:34           ` Wei Li
2019-04-15 23:23           ` Dongli Zhang
2019-04-15 23:23             ` Dongli Zhang
2019-04-16  9:20             ` Stefan Hajnoczi
2019-04-16  9:20               ` Stefan Hajnoczi
2019-04-17  1:42               ` Wei Li
2019-04-17  1:42                 ` Wei Li
     [not found]               ` <8E5AF770-69ED-4D44-8A25-B51344996D9E@oracle.com>
2019-04-23  4:21                 ` Wei Li
2019-04-23  4:21                   ` Wei Li
2019-04-23 12:04                   ` Stefan Hajnoczi
2019-04-23 12:04                     ` Stefan Hajnoczi
2019-04-26  8:14                     ` Paolo Bonzini
2019-04-26  8:14                       ` Paolo Bonzini
2019-04-26 23:02                       ` Wei Li
2019-04-26 23:02                         ` Wei Li
2019-04-27  4:24                         ` Paolo Bonzini
2019-04-27  4:24                           ` Paolo Bonzini
2019-04-29 17:49                           ` Wei Li
2019-04-29 17:49                             ` Wei Li
2019-04-29 13:40                       ` Stefan Hajnoczi [this message]
2019-04-29 13:40                         ` Stefan Hajnoczi
2019-04-29 17:56                         ` Wei Li
2019-04-29 17:56                           ` Wei Li
2019-05-01 16:36                           ` Stefan Hajnoczi
2019-05-01 16:36                             ` Stefan Hajnoczi
2019-05-03 16:21                             ` Wei Li
2019-05-03 16:21                               ` Wei Li
2019-05-03 18:05                               ` Paolo Bonzini
2019-05-03 18:05                                 ` Paolo Bonzini
2019-05-03 18:11                                 ` Wei Li
2019-05-03 18:11                                   ` Wei Li
2019-04-30 11:21                         ` Paolo Bonzini
2019-04-30 11:21                           ` Paolo Bonzini

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=20190429134048.GH7587@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=dongli.zhang@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=wei.d.li@oracle.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).