Received: from eggs.gnu.org ([140.186.70.92]:45696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKSiM-0001aK-JW for qemu-devel@nongnu.org; Sun, 30 Oct 2011 06:34:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKSiL-0002Nb-9j for qemu-devel@nongnu.org; Sun, 30 Oct 2011 06:34:06 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:58037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKSiL-0002My-3w for qemu-devel@nongnu.org; Sun, 30 Oct 2011 06:34:05 -0400 Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 30 Oct 2011 04:33:59 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9UAXh7F153680 for ; Sun, 30 Oct 2011 04:33:48 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9UAXheG027344 for ; Sun, 30 Oct 2011 04:33:43 -0600 From: Supriya Kannery Date: Sun, 30 Oct 2011 16:03:27 +0530 Message-Id: <20111030103327.31685.17045.sendpatchset@skannery.in.ibm.com> Subject: [Qemu-devel] [v8 Patch 0/6]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. 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. b. a new option for setting host cache from qemu commandline option -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 drivers raw-posix is done here. d. 'hostcache and 'cache' options when used together, cache=xx will override hostcache=yy. v8: 1. Mandate implementation of all three reopen related functions by block drivers. 2. If 'cache=xx' and 'hostcache=yy' specified in cmdline, 'cache=' overrides 'hostcache='. v7: 1. Added structure BDRVReopenState to support safe reopening of image files. 2. Implemented reopen functions for raw-posix driver 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