From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbwfK-0002zl-J6 for Qemu-devel@nongnu.org; Wed, 29 Jun 2011 11:26:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbwfJ-0005Op-0e for Qemu-devel@nongnu.org; Wed, 29 Jun 2011 11:26:58 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:51576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbwfI-0005Nv-PC for Qemu-devel@nongnu.org; Wed, 29 Jun 2011 11:26:56 -0400 Received: by gyg10 with SMTP id 10so606948gyg.4 for ; Wed, 29 Jun 2011 08:26:55 -0700 (PDT) Message-ID: <4E0B443C.3070608@codemonkey.ws> Date: Wed, 29 Jun 2011 10:26:52 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <4E0B1399.4050807@redhat.com> <4E0B15B2.40504@codemonkey.ws> <20110629135545.GD15863@lst.de> <4E0B3493.4080706@codemonkey.ws> <20110629145248.GC17085@lst.de> In-Reply-To: <20110629145248.GC17085@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Default cache mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: Kevin Wolf , Avi Kivity , Qemu-devel@nongnu.org, Stefan Hajnoczi On 06/29/2011 09:52 AM, Christoph Hellwig wrote: > On Wed, Jun 29, 2011 at 09:20:03AM -0500, Anthony Liguori wrote: >> Sorry, I meant having a new cache option (maybe diskcache). Semantics >> would be: >> >> diskcache=on,wce=on 0 >> diskcache=on,wce=off O_SYNC >> diskcache=off,wce=on O_DIRECT >> diskcache=off,wce=off O_DIRECT | O_SYNC >> >> ignore_flush could be another option too. > > Please make it two options instead of a two-dimensional one. Yeah, that was just for the table. diskcache/hostcache belongs in -drive, wce belongs in -device. > E.g. e hostcache=[on,off] option for the drive command line, > where fake is the equivalent of the current code together with > >> I think developers usually want diskcache=on but I also agree that usually >> in production, you want diskcache=off. > > Why would you want to not use O_DIRECT as a developer? Relaunching the same guest: cache=writethrough: real 0m9.500s user 0m4.720s sys 0m3.780s cache=none: real 0m15.263s user 0m4.870s sys 0m6.390s If you're doing kernel development where you're frequently launching the same guest with a different kernel, it using the page cache makes a big difference in guest boot time. Regards, Anthony Liguori