From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsQWn-0005G3-9X for qemu-devel@nongnu.org; Tue, 31 Jan 2012 22:06:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsQWi-0006Nh-0q for qemu-devel@nongnu.org; Tue, 31 Jan 2012 22:06:33 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:50646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsQWh-0006NX-Tv for qemu-devel@nongnu.org; Tue, 31 Jan 2012 22:06:27 -0500 Received: from /spool/local by e1.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 31 Jan 2012 22:06:23 -0500 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 7821B38C803A for ; Tue, 31 Jan 2012 22:06:05 -0500 (EST) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q11365sg306454 for ; Tue, 31 Jan 2012 22:06:05 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q11364J3012814 for ; Tue, 31 Jan 2012 22:06:05 -0500 From: Supriya Kannery Date: Wed, 01 Feb 2012 08:35:57 +0530 Message-Id: <20120201030557.2990.74150.sendpatchset@skannery.in.ibm.com> Subject: [Qemu-devel] [RFC Patch 0/7]Qemu: Dynamic host pagecache change List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Christoph Hellwig , Luiz Capitulino 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