From: Max Reitz <mreitz@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, John Snow <jsnow@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] block: add missed BDRV_O_NOCACHE when block device is opened without file
Date: Wed, 25 Jan 2017 18:59:06 +0100 [thread overview]
Message-ID: <1e511c84-c9fa-1d4e-8a73-e48c0b29a59a@redhat.com> (raw)
In-Reply-To: <1485362572-7246-1-git-send-email-den@openvz.org>
[-- Attachment #1: Type: text/plain, Size: 3259 bytes --]
[CC-ing John]
On 25.01.2017 17:42, Denis V. Lunev wrote:
> Technically there is a problem when the guest DVD is created by libvirt
> with AIO mode 'native' on Linux. Current QEMU is unable to start the
> domain configured as follows:
> <disk type='file' device='cdrom'>
> <driver name='qemu' type='raw' cache='none' io='native'/>
> <target dev='sdb' bus='scsi'/>
> <readonly/>
> </disk>
> The problem comes from the combination of 'cache' and 'io' options.
>
> 'io' option is common option and it is removed from block driver
> specific options. 'cache' originally is not. The patch makes 'cache'
> option common. This works fine as long as cdrom media insertion
> later on.
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Kevin Wolf <kwolf@redhat.com>
> CC: Max Reitz <mreitz@redhat.com>
> ---
> blockdev.c | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
There was a Red Hat BZ for this:
https://bugzilla.redhat.com/show_bug.cgi?id=1342999
There is now a corresponding BZ for libvirt:
https://bugzilla.redhat.com/show_bug.cgi?id=1377321
The gist is that it was determined to be a problem with libvirt.
RHEL has a downstream commit to work around this issue by ignoring the
cache mode set for empty CD-ROMs -- but that is only because that was
simpler than fixing libvirt.
(Note that it's ignoring the cache mode instead of actually evaluating it.)
> May be this has already discussed, but still. AIO=native for CDROM without
> media seems important case.
First, I personally don't find aio=native very important for CD-ROM
drives. Yes, we shouldn't make IDE CD-ROM slower than necessary, but I
don't think aio=native will make the difference between "Slow like
CD-ROMs are in reality" and "As fast as virtio".
Second, all this patch does is revert some changes done by commit
91a097e7478940483e76d52217f05bc05b98d5a5, which was very deliberate.
Third, you may then be asking for the recommended way to put an
aio=native medium into a CD-ROM drive. Good thing you ask, because we
have a way that we want to recommend but can't because it's still
considered experimental:
The BDS is added using blockdev-add, with all of the appropriate caching
and aio options. Then it's inserted into the drive using the
x-blockdev-insert-medium command, and the drive is closed using
blockdev-close-tray.
There are a couple of issues with this: First, blockdev-add and
x-blockdev-insert-medium are still experimental. The good news are that
I think the reason why the latter is experimental has actually
disappeared and we can just drop the x- by now. The
not-so-good-but-not-so-bad-either news are that we plan to get
blockdev-add declared non-experimental for 2.9. Let's see how it goes.
The other issue is that of course it's more cumbersome to use than a
simple 'change' via HMP. I argue that if someone communicates with a VM
by hand, they either have to deal with this added complexity or they
cannot use aio=native for CD-ROM drives -- which, as I said, I don't
think is too bad.
However, there is a reason why you cannot set cache/aio for an empty
drive and it's simply that it doesn't make sense.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
next prev parent reply other threads:[~2017-01-25 17:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 16:42 [Qemu-devel] [PATCH 1/1] block: add missed BDRV_O_NOCACHE when block device is opened without file Denis V. Lunev
2017-01-25 17:59 ` Max Reitz [this message]
2017-01-25 19:44 ` Denis V. Lunev
2017-01-28 16:23 ` Max Reitz
2017-01-30 8:31 ` Denis V. Lunev
2017-01-30 9:53 ` Kevin Wolf
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=1e511c84-c9fa-1d4e-8a73-e48c0b29a59a@redhat.com \
--to=mreitz@redhat.com \
--cc=den@openvz.org \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).