From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbvGa-00031U-Ih for Qemu-devel@nongnu.org; Wed, 29 Jun 2011 09:57:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbvGY-00072F-Dt for Qemu-devel@nongnu.org; Wed, 29 Jun 2011 09:57:20 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:40113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbvGY-000729-7S for Qemu-devel@nongnu.org; Wed, 29 Jun 2011 09:57:18 -0400 Received: by gwb19 with SMTP id 19so551928gwb.4 for ; Wed, 29 Jun 2011 06:57:17 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <513A5DA9-54CC-4D7C-9715-2F131087F3EF@suse.de> References: <4E0B1399.4050807@redhat.com> <513A5DA9-54CC-4D7C-9715-2F131087F3EF@suse.de> Date: Wed, 29 Jun 2011 14:57:17 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] Default cache mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Kevin Wolf , Qemu-devel@nongnu.org, Avi Kivity , Stefan Hajnoczi , Christoph Hellwig On Wed, Jun 29, 2011 at 1:21 PM, Alexander Graf wrote: > On 29.06.2011, at 13:59, Kevin Wolf wrote: >> I'm not entirely sure if I should suggest writeback or none as the new >> default, but I think it could make sense to change it. > > None as default would be a bad choice, as not all underlying file systems support it. Try cache=none on tmpfs or nfs. It will just fail on you. > What I'd personally like to see is some sort of detection that can determine which caching mode would perform best. So it would do cache=none when it makes sense (raw block device), otherwise cache=writeback. O_DIRECT works on the Linux NFS client. The performance currently isn't great with vectored I/O (which QEMU does) but there is work ongoing to improve it. Your point makes sense though. The default (no explicit cache=) should mean "the most appropriate caching mode". Stefan