From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfdQA-000360-1n for qemu-devel@nongnu.org; Fri, 15 Jun 2012 16:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfdQ7-0000rS-V6 for qemu-devel@nongnu.org; Fri, 15 Jun 2012 16:47:05 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:38737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfdQ7-0000pT-PD for qemu-devel@nongnu.org; Fri, 15 Jun 2012 16:47:03 -0400 Received: from /spool/local by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 15 Jun 2012 14:46:54 -0600 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 7634DC90058 for ; Fri, 15 Jun 2012 16:46:51 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5FKkqFr197438 for ; Fri, 15 Jun 2012 16:46:52 -0400 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 q5FKkpLm028876 for ; Fri, 15 Jun 2012 16:46:52 -0400 From: Supriya Kannery Date: Sat, 16 Jun 2012 02:16:48 +0530 Message-Id: <20120615204648.9853.1225.sendpatchset@skannery.in.ibm.com> Subject: [Qemu-devel] [v1 Patch 0/10]Qemu: Dynamic host pagecache change and image file reopen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Shrinidhi Joshi , Stefan Hajnoczi , Jeff Cody , Luiz Capitulino , Christoph Hellwig 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 implemented for raw-posix, raw-win32, vmdk, qcow, qcow2 and qed block drivers. * 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: * Currently driver state is stashed by field-by-field copy. Optimise this by stashing only the required fields. * Find out other drivers needing bdrv_reopen implementation. * Do some more extensive testing, especially with drivers like floppy, cdrom etc.. Earlier discussions on RFC for dynamic change of host pagecache can be found at: http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg04139.html New block command added: "block_set_hostcache" -- Sets hostcache parameter for block device while guest is running. Usage: block_set_hostcache