From: Stefan Hajnoczi <stefanha@gmail.com>
To: ashish mittal <ashmit602@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Kevin Wolf <kwolf@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
"Daniel P. Berrange" <berrange@redhat.com>,
Jeff Cody <jcody@redhat.com>, Fam Zheng <famz@redhat.com>,
Ashish Mittal <ashish.mittal@veritas.com>,
Ketan Nilangekar <Ketan.Nilangekar@veritas.com>,
John Ferlan <jferlan@redhat.com>,
Buddhi Madhav <Buddhi.Madhav@veritas.com>,
Suraj Singh <Suraj.Singh@veritas.com>,
Nitin Jerath <Nitin.Jerath@veritas.com>,
Peter Maydell <peter.maydell@linaro.org>,
"Venkatesha M.G." <venkatesha.mg@veritas.com>,
Abhijit Dey <Abhijit.Dey@veritas.com>
Subject: Re: [Qemu-devel] [PATCH v10 1/2] block/vxhs.c: Add support for a new block device type called "vxhs"
Date: Mon, 3 Apr 2017 16:11:54 +0100 [thread overview]
Message-ID: <20170403151154.GD3539@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAAo6VWNShCJDYkRSC-qCZ_X002ud5QLpHgP7V-51XaPqaRcggA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3819 bytes --]
On Fri, Mar 31, 2017 at 11:25:02AM -0700, ashish mittal wrote:
> On Mon, Mar 27, 2017 at 6:04 PM, ashish mittal <ashmit602@gmail.com> wrote:
> > On Mon, Mar 27, 2017 at 10:27 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> >> On Sun, Mar 26, 2017 at 07:50:35PM -0700, Ashish Mittal wrote:
> >>
> >> Have you tested live migration?
> >>
> >> If live migration is not supported then a migration blocker should be
> >> added using migrate_add_blocker().
> >>
> >
> > We do support live migration. We have been testing a fork of this code
> > (slightly different version) with live migration.
The reason I ask is because this patch doesn't implement the
BlockDriver bdrv_invalidate_cache()/bdrv_inactivate() callbacks. These
functions are invoked during live migration so that the block driver can
ensure data consistency.
Since the destination QEMU process is launched while the source QEMU is
still running and making changes to the disk, some block drivers need to
discard metadata at migration handover time that was read upon opening
the image on the destination. The guarantees that they see the latest
metadata.
Not sure if libvxhs caches anything that might get stale during live
migration, but I wanted to raise this question?
Regarding a fork of this code that you haven't posted to the mailing
list, it doesn't exist as far as anyone here is concerned :). Therefore
either the code on the mailing list needs to support migration or it
must register a migration blocker to prevent migration.
> >>> +static BlockDriver bdrv_vxhs = {
> >>> + .format_name = "vxhs",
> >>> + .protocol_name = "vxhs",
> >>> + .instance_size = sizeof(BDRVVXHSState),
> >>> + .bdrv_file_open = vxhs_open,
> >>> + .bdrv_parse_filename = vxhs_parse_filename,
> >>> + .bdrv_close = vxhs_close,
> >>> + .bdrv_getlength = vxhs_getlength,
> >>> + .bdrv_aio_readv = vxhs_aio_readv,
> >>> + .bdrv_aio_writev = vxhs_aio_writev,
> >>
> >> Missing .bdrv_aio_flush(). Does VxHS promise that every completed write
> >> request is persistent?
> >>
> >
> > Yes, every acknowledged write request is persistent.
> >
> >> In that case it may be better to disable the emulated disk write cache
> >> so the guest operating system and application know not to send flush
> >> commands.
> >
> > We do pass "cache=none" on the qemu command line for every block
> > device. Are there any other code changes necessary? Any pointers will
> > help.
> >
>
> Upon further reading, I now understand that cache=none will not
> disable the emulated disk write cache. I am trying to understand if -
> (1) It should still not be a problem since flush will just be a no-op for us.
The guest operating system and applications may take different code
paths depending on the state of the disk write cache.
Useless vmexits can be eliminated if the guest doesn't need to send
flush commands. Hence the file system and applications may perform
better.
> (2) Is there a way, or reason, to disable the emulated disk write
> cache in the code for vxhs? I think passing WCE=0 to the guest has
> something to do with this, although I have yet to figure out what that
> means.
Right, WCE == "Write Cache Enable". If you disable the write cache then
the guest's SCSI disk or virtio-blk drivers will notice that the disk
does not require flush commands.
Try launching a guest with -drive if=none,id=drive0,cache=directsync,...
and you should see that the write cache is disabled:
# cat /sys/block/vda/queue/write_cache
> (3) Is this a must for merge?
This doesn't affect the block driver code so no change is necessary.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2017-04-03 15:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 2:50 [Qemu-devel] [PATCH v10 1/2] block/vxhs.c: Add support for a new block device type called "vxhs" Ashish Mittal
2017-03-27 2:50 ` [Qemu-devel] [PATCH v10 2/2] block/vxhs.c: Add qemu-iotests for new block device type "vxhs" Ashish Mittal
2017-03-27 15:56 ` Stefan Hajnoczi
2017-03-27 15:56 ` [Qemu-devel] [PATCH v10 1/2] block/vxhs.c: Add support for a new block device type called "vxhs" Eric Blake
2017-03-27 18:25 ` ashish mittal
2017-03-27 18:50 ` Eric Blake
2017-03-27 17:27 ` Stefan Hajnoczi
2017-03-28 1:04 ` ashish mittal
2017-03-31 18:25 ` ashish mittal
2017-04-03 15:11 ` Stefan Hajnoczi [this message]
2017-04-03 21:08 ` ashish mittal
2017-03-28 17:03 ` Jeff Cody
2017-03-30 3:20 ` ashish mittal
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=20170403151154.GD3539@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=Abhijit.Dey@veritas.com \
--cc=Buddhi.Madhav@veritas.com \
--cc=Ketan.Nilangekar@veritas.com \
--cc=Nitin.Jerath@veritas.com \
--cc=Suraj.Singh@veritas.com \
--cc=armbru@redhat.com \
--cc=ashish.mittal@veritas.com \
--cc=ashmit602@gmail.com \
--cc=berrange@redhat.com \
--cc=famz@redhat.com \
--cc=jcody@redhat.com \
--cc=jferlan@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=venkatesha.mg@veritas.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).