From: Supriya Kannery <supriyak@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Christoph Hellwig <hch@lst.de>,
Luiz Capitulino <lcapitulino@redhat.com>
Subject: [Qemu-devel] [RFC Patch 0/7]Qemu: Dynamic host pagecache change
Date: Wed, 01 Feb 2012 08:35:57 +0530 [thread overview]
Message-ID: <20120201030557.2990.74150.sendpatchset@skannery.in.ibm.com> (raw)
For changing host pagecache setting of a running VM, it is
important to have a safe way of reopening its image file.
Following patchset introduces:
* a generic way to reopen image files safely.
In this approach, before reopening an image, for each
block driver, its state will be stashed. Incase preparation
(bdrv_reopen_prepare) for reopening returns success, the stashed
state will be cleared (bdrv_reopen_commit) and reopened state will
be used further. Incase preparation of reopening returns failure,
the state of the driver will be rolled back (bdrv_reopen_abort)
to the stashed state.
This approach is extended to raw-posix, raw-win32 and vmdk block
drivers in this patchset. Once this is reviewed and finalised, I will
extend the implementation to other drivers like qcow2, qed etc..
* qmp and hmp command 'block_set_hostcache' using which host
pagecache setting for a block device can be changed
when the VM is running.
* BDRVReopenState, a generic structure which can be
extended by each of the block drivers to reopen
respective image files.
ToDo:
* memcpy is used to save driver state. Replace this with copying
individual fields of driver state (?)
* Extend this implementation to other block drivers.
* Build and verify raw-win32 driver changes in windows
Earlier discussions related to dynamic change of host pagecache can be found
at: http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg01482.html
New block command added:
"block_set_hostcache"
-- Sets hostcache parameter for block device while guest is running.
Usage:
block_set_hostcache <device> <option>
<device> = block device
<option> = on/off
qemu/block.c | 112 +++++++++++++++++++++++++++++++++++++++++++++----
qemu/block.h | 5 +
qemu/block/raw-posix.c | 74 ++++++++++++++++++++++++++++++++
qemu/block/raw-win32.c | 95 +++++++++++++++++++++++++++++++++++++++++
qemu/block/raw.c | 20 ++++++++
qemu/block/vmdk.c | 80 +++++++++++++++++++++++++++++++++--
qemu/block_int.h | 11 ++++
qemu/blockdev.c | 26 +++++++++++
qemu/blockdev.h | 2
qemu/hmp-commands.hx | 14 ++++++
qemu/hmp.c | 2
qemu/qapi-schema.json | 4 +
qemu/qemu-common.h | 1
qemu/qerror.c | 8 +++
qemu/qerror.h | 6 ++
qemu/qmp-commands.hx | 27 +++++++++++
18 files changed, 474 insertions(+), 13 deletions(-)
~
~
~
~
~
~
~
~
~
-- INSERT --
next reply other threads:[~2012-02-01 3:06 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 3:05 Supriya Kannery [this message]
2012-02-01 3:06 ` [Qemu-devel] [RFC Patch 1/7]Qemu: Enhance "info block" to display host cache setting Supriya Kannery
2012-02-08 12:00 ` Luiz Capitulino
2012-02-13 13:19 ` Supriya Kannery
2012-02-01 3:06 ` [Qemu-devel] [RFC Patch 2/7]Qemu: Error classes for file reopen and data sync failure Supriya Kannery
2012-02-07 7:56 ` Stefan Hajnoczi
2012-02-13 13:13 ` Supriya Kannery
2012-02-01 3:06 ` [Qemu-devel] [RFC Patch 3/7]Qemu: Cmd "block_set_hostcache" for dynamic cache change Supriya Kannery
2012-02-02 0:09 ` Michael Roth
2012-02-02 10:14 ` Kevin Wolf
2012-02-08 12:07 ` Luiz Capitulino
2012-02-13 13:21 ` Supriya Kannery
2012-02-01 3:06 ` [Qemu-devel] [RFC Patch 4/7]Qemu: Framework for reopening image files safely Supriya Kannery
2012-02-07 10:08 ` Stefan Hajnoczi
2012-02-14 13:34 ` Supriya Kannery
2012-02-08 15:07 ` Kevin Wolf
2012-02-13 13:49 ` Supriya Kannery
2012-02-01 3:07 ` [Qemu-devel] [RFC Patch 5/7]Qemu: raw-posix image file reopen Supriya Kannery
2012-02-02 0:15 ` Michael Roth
2012-02-13 13:12 ` Supriya Kannery
2012-02-07 10:17 ` Stefan Hajnoczi
2012-02-14 13:36 ` Supriya Kannery
2012-02-08 14:54 ` Kevin Wolf
2012-02-13 13:28 ` Supriya Kannery
2012-02-01 3:07 ` [Qemu-devel] [RFC Patch 6/7]Qemu: raw-win32 " Supriya Kannery
2012-02-08 15:02 ` Kevin Wolf
2012-02-13 13:29 ` Supriya Kannery
2012-02-01 3:07 ` [Qemu-devel] [RFC Patch 7/7]Qemu: vmdk " Supriya Kannery
2012-02-01 22:41 ` [Qemu-devel] [RFC Patch 0/7]Qemu: Dynamic host pagecache change Eric Blake
2012-02-02 9:12 ` 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=20120201030557.2990.74150.sendpatchset@skannery.in.ibm.com \
--to=supriyak@linux.vnet.ibm.com \
--cc=hch@lst.de \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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).