From: "Michael S. Tsirkin" <mst@redhat.com>
To: Felipe Franciosi <felipe@nutanix.com>
Cc: "Harris, James R" <james.r.harris@intel.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
"Denis V. Lunev" <den@openvz.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>,
"Liu, Changpeng" <changpeng.liu@intel.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] virtio: fix IO request length in virtio SCSI/block
Date: Wed, 20 Dec 2017 06:16:08 +0200 [thread overview]
Message-ID: <20171220061340-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <5E82066E-45E4-4627-8EB5-F995FFCB1ADF@nutanix.com>
On Mon, Dec 18, 2017 at 07:35:48PM +0000, Felipe Franciosi wrote:
> >> CCed Felipe (Nutanix) and Jim (SPDK) in case they have comments.
> >
> > SPDK vhost-user targets only expect max 128 segments. They also pre-allocate I/O task structures when QEMU connects to the vhost-user device.
> >
> > Supporting up to 1022 segments would result in significantly higher memory usage, reduction in I/O queue depth processed by the vhost-user target, or having to dynamically allocate I/O task structures - none of which are ideal.
> >
> > What if this was just bumped from 126 to 128? I guess I’m trying to understand the level of guest and host I/O performance that is gained with this patch. One I/O per 512KB vs. one I/O per 4MB - we are still only talking about a few hundred IO/s difference.
>
> SeaBIOS also makes the assumption that the queue size is not bigger than 128 elements.
> https://review.coreboot.org/cgit/seabios.git/tree/src/hw/virtio-ring.h#n23
And what happens if it's bigger? Looks like a bug to me.
> Perhaps a better approach is to make the value configurable (ie. add the "max_segments" property), but set the default to 128-2. In addition to what Jim pointed out, I think there may be other legacy front end drivers which can assume the ring will be at most 128 entries in size.
>
> With that, hypervisors can choose to bump the value higher if it's known to be safe for their host+guest configuration.
>
> Cheers,
> Felipe
For 1.0 guests can just downgrade to 128 if they want to save memory.
So it might make sense to gate this change on 1.0 enabled by guest.
> >
> > -Jim
> >
> >
>
next prev parent reply other threads:[~2017-12-20 4:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-15 15:02 [Qemu-devel] [PATCH v3 0/2] virtio: fix IO request length in virtio SCSI/block Denis V. Lunev
2017-12-15 15:02 ` [Qemu-devel] [PATCH 1/2] pc, q35: add 2.12 machine types Denis V. Lunev
2017-12-18 13:54 ` Christian Borntraeger
2017-12-15 15:02 ` [Qemu-devel] [PATCH 2/2] virtio: fix IO request length in virtio SCSI/block Denis V. Lunev
2017-12-18 13:38 ` Stefan Hajnoczi
2017-12-18 16:16 ` Harris, James R
2017-12-18 19:35 ` Felipe Franciosi
2017-12-18 19:42 ` Denis V. Lunev
2017-12-19 8:57 ` Roman Kagan
2017-12-19 9:59 ` Liu, Changpeng
2017-12-20 4:16 ` Michael S. Tsirkin [this message]
2017-12-18 13:38 ` [Qemu-devel] [PATCH v3 0/2] " Stefan Hajnoczi
2017-12-19 12:45 ` Denis V. Lunev
2017-12-20 4:17 ` Michael S. Tsirkin
2017-12-20 4:23 ` Michael S. Tsirkin
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=20171220061340-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=changpeng.liu@intel.com \
--cc=den@openvz.org \
--cc=ehabkost@redhat.com \
--cc=felipe@nutanix.com \
--cc=james.r.harris@intel.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--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).