From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Denis Plotnikov <dplotnikov@virtuozzo.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, fam@euphon.net, ehabkost@redhat.com,
qemu-block@nongnu.org, mst@redhat.com, mreitz@redhat.com,
stefanha@redhat.com, pbonzini@redhat.com
Subject: Re: [PATCH v2] virtio: increase virtuqueue size for virtio-scsi and virtio-blk
Date: Thu, 13 Feb 2020 16:43:24 +0100 [thread overview]
Message-ID: <c2e394b4-8dd6-f845-9b40-79a12441f676@redhat.com> (raw)
In-Reply-To: <20200213145927.7539-1-dplotnikov@virtuozzo.com>
Typo 'virtuqueue' in subject.
On 2/13/20 3:59 PM, Denis Plotnikov wrote:
> v1:
> * seg_max default value changing removed
>
^^^ This part ...
> ---
> The goal is to reduce the amount of requests issued by a guest on
> 1M reads/writes. This rises the performance up to 4% on that kind of
> disk access pattern.
>
> The maximum chunk size to be used for the guest disk accessing is
> limited with seg_max parameter, which represents the max amount of
> pices in the scatter-geather list in one guest disk request.
>
> Since seg_max is virqueue_size dependent, increasing the virtqueue
> size increases seg_max, which, in turn, increases the maximum size
> of data to be read/write from a guest disk.
>
> More details in the original problem statment:
> https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg03721.html
>
> Suggested-by: Denis V. Lunev <den@openvz.org>
> Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
> ---
... goes here.
> hw/block/virtio-blk.c | 2 +-
> hw/core/machine.c | 2 ++
> hw/scsi/virtio-scsi.c | 2 +-
> 3 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
> index 09f46ed85f..142863a3b2 100644
> --- a/hw/block/virtio-blk.c
> +++ b/hw/block/virtio-blk.c
> @@ -1272,7 +1272,7 @@ static Property virtio_blk_properties[] = {
> DEFINE_PROP_BIT("request-merging", VirtIOBlock, conf.request_merging, 0,
> true),
> DEFINE_PROP_UINT16("num-queues", VirtIOBlock, conf.num_queues, 1),
> - DEFINE_PROP_UINT16("queue-size", VirtIOBlock, conf.queue_size, 128),
> + DEFINE_PROP_UINT16("queue-size", VirtIOBlock, conf.queue_size, 256),
> DEFINE_PROP_BOOL("seg-max-adjust", VirtIOBlock, conf.seg_max_adjust, true),
> DEFINE_PROP_LINK("iothread", VirtIOBlock, conf.iothread, TYPE_IOTHREAD,
> IOThread *),
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 2501b540ec..3427d6cf4c 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -28,6 +28,8 @@
> #include "hw/mem/nvdimm.h"
>
> GlobalProperty hw_compat_4_2[] = {
> + { "virtio-blk-device", "queue-size", "128"},
> + { "virtio-scsi-device", "virtqueue_size", "128"},
> { "virtio-blk-device", "x-enable-wce-if-config-wce", "off" },
> { "virtio-blk-device", "seg-max-adjust", "off"},
> { "virtio-scsi-device", "seg_max_adjust", "off"},
> diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> index 3b61563609..472bbd233b 100644
> --- a/hw/scsi/virtio-scsi.c
> +++ b/hw/scsi/virtio-scsi.c
> @@ -965,7 +965,7 @@ static void virtio_scsi_device_unrealize(DeviceState *dev, Error **errp)
> static Property virtio_scsi_properties[] = {
> DEFINE_PROP_UINT32("num_queues", VirtIOSCSI, parent_obj.conf.num_queues, 1),
> DEFINE_PROP_UINT32("virtqueue_size", VirtIOSCSI,
> - parent_obj.conf.virtqueue_size, 128),
> + parent_obj.conf.virtqueue_size, 256),
> DEFINE_PROP_BOOL("seg_max_adjust", VirtIOSCSI,
> parent_obj.conf.seg_max_adjust, true),
> DEFINE_PROP_UINT32("max_sectors", VirtIOSCSI, parent_obj.conf.max_sectors,
>
next prev parent reply other threads:[~2020-02-13 15:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-13 14:59 [PATCH v2] virtio: increase virtuqueue size for virtio-scsi and virtio-blk Denis Plotnikov
2020-02-13 15:43 ` Philippe Mathieu-Daudé [this message]
2020-02-18 13:53 ` Stefan Hajnoczi
2020-02-18 13:59 ` Denis Plotnikov
2020-02-18 14:03 ` Denis Plotnikov
-- strict thread matches above, loose matches on Subject: below --
2020-02-11 14:14 Denis Plotnikov
2020-02-12 15:43 ` Stefan Hajnoczi
2020-02-13 8:08 ` Denis Plotnikov
2020-02-13 9:08 ` Stefan Hajnoczi
2020-02-13 9:28 ` Denis Plotnikov
2020-02-13 11:45 ` Stefan Hajnoczi
2020-02-13 12:41 ` Denis Plotnikov
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=c2e394b4-8dd6-f845-9b40-79a12441f676@redhat.com \
--to=philmd@redhat.com \
--cc=dplotnikov@virtuozzo.com \
--cc=ehabkost@redhat.com \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--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).