Received: from eggs.gnu.org ([140.186.70.92]:47609) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDSk7-0007pz-Fx for qemu-devel@nongnu.org; Mon, 10 Oct 2011 23:11:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDSk6-0001AU-E3 for qemu-devel@nongnu.org; Mon, 10 Oct 2011 23:10:59 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.144]:36427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDSk6-00019g-AG for qemu-devel@nongnu.org; Mon, 10 Oct 2011 23:10:58 -0400 Received: from /spool/local by e4.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 10 Oct 2011 23:10:52 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9B3AnKQ219300 for ; Mon, 10 Oct 2011 23:10:50 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9B3AnoP007602 for ; Tue, 11 Oct 2011 00:10:49 -0300 From: Supriya Kannery Date: Tue, 11 Oct 2011 08:40:46 +0530 Message-Id: <20111011031046.9587.44474.sendpatchset@skannery.in.ibm.com> Subject: [Qemu-devel] [v7 Patch 0/5]Qemu: Host pagecache setting from cmdline and monitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Christoph Hellwig Currently cache setting of a block device cannot be changed without restarting a running VM. Following patchset is for enabling dynamic change of cache setting for block devices through qemu monitor and qmp. Code changes are based on patches from Christoph Hellwig and Prerna Saxena. This patchset introduces a. monitor command 'block_set_hostcache' using which host pagecache setting for a block device can be changed dynamically while guest VM is running. b. 'hostcache' - a new option for setting host cache from qemu command -drive "hostcache=on/off". c. BDRVReopenState, a generic structure which can be extended by each of the block drivers to reopen respective image files. Extension of this structure for raw-posix is done for now. I am working on to extend the same for raw-win32 image files as well. Note: 'Hostcache and 'cache' options cannot be used simultaneously from commandline. v7: 1. Added structure BDRVReopenState to support safe reopening of image files. v6: 1. "block_set_hostcache" to replace "block_set" command v5: 1. Defined qerror class for incorrect command syntax. 2. Changed error_report() calls to qerror_report() v4: Added 'hostcache' option to '-drive' commandline option. v3: 1. Command "block_set" for changing various block params 2. Enhanced info-block to display hostcache setting 3. Added qmp interfaces for setting and querying hostcache v2: 1. Support of dynamic cache change only for hostcache. 2. Monitor command "hostcache_get" added to display cache setting 3. Backed off the changes for display of cache setting in "info block" v1: Dynamic cache change through monitor New block command added: "block_set_hostcache" -- Sets hostcache parameter for block device while guest is running. Usage: block_set_hostcache