From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] qemu-img: Add nocache command line option Date: Tue, 14 Jun 2011 16:13:05 +0300 Message-ID: <4DF75E61.2010500@redhat.com> References: <1308053382-9771-1-git-send-email-fsimonce@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Federico Simoncelli Return-path: Received: from mx1.redhat.com ([209.132.183.28]:6609 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751176Ab1FNNNI (ORCPT ); Tue, 14 Jun 2011 09:13:08 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5EDD8qG010056 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 14 Jun 2011 09:13:08 -0400 In-Reply-To: <1308053382-9771-1-git-send-email-fsimonce@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/14/2011 03:09 PM, Federico Simoncelli wrote: > qemu-img currently writes images using writeback and filling up > the cache buffers which are then flushed by the kernel preventing > other processes from accessing the storage. > This is particularly bad in cluster environments where time-based > algorithms might be in place and accessing the storage within > certain timeouts is critical. > This patch adds the option to use nocache when other solutions > (eg: cgroups) are not available. > Please copy qemu-devel@nongnu.org as this is not a kvm-specific patch. > diff --git a/qemu-img.c b/qemu-img.c > index 4f162d1..c10e4a6 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -78,6 +78,7 @@ static void help(void) > " rebasing in this case (useful for renaming the backing file)\n" > " '-h' with or without a command shows this help and lists the supported formats\n" > " '-p' show progress of command (only certain commands)\n" > + " '-t' use write-through (no cache), valid with: convert, commit and rebase\n" > "\n" > "Parameters to snapshot subcommand:\n" > " 'snapshot' is the name of the snapshot to create, apply or delete\n" IMO better to use the existing qemu option format, say -o cache=writeback|writethrough|none|volatile. -- error compiling committee.c: too many arguments to function