From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzDdK-00075D-O0 for qemu-devel@nongnu.org; Mon, 03 Dec 2007 10:54:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzDdI-000751-Bw for qemu-devel@nongnu.org; Mon, 03 Dec 2007 10:54:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzDdI-00074y-6A for qemu-devel@nongnu.org; Mon, 03 Dec 2007 10:54:56 -0500 Received: from nz-out-0506.google.com ([64.233.162.231]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IzDdH-0001NK-Or for qemu-devel@nongnu.org; Mon, 03 Dec 2007 10:54:55 -0500 Received: by nz-out-0506.google.com with SMTP id f1so8054833nzc for ; Mon, 03 Dec 2007 07:54:54 -0800 (PST) Message-ID: <475426C7.20503@codemonkey.ws> Date: Mon, 03 Dec 2007 09:54:47 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/2 v2] Direct IDE I/O References: <11966765602186@bull.net> <4753D920.4060500@bellard.org> <1196677804.5275.5.camel@frecb07144> In-Reply-To: <1196677804.5275.5.camel@frecb07144> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Laurent Vivier wrote: > Le lundi 03 décembre 2007 à 11:23 +0100, Fabrice Bellard a écrit : > >> Laurent Vivier wrote: >> >>> This patch enhances the "-drive ,cache=off" mode with IDE drive emulation >>> by removing the buffer used in the IDE emulation. >>> --- >>> block.c | 10 +++ >>> block.h | 2 >>> block_int.h | 1 >>> cpu-all.h | 1 >>> exec.c | 19 ++++++ >>> hw/ide.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- >>> vl.c | 1 >>> 7 files changed, 204 insertions(+), 6 deletions(-) >>> >> What's the use of keeping the buffered case ? >> > > Well, I don't like to remove code written by others... > and I don't want to break something. > > But if you think I should remove the buffered case, I can. > > BTW, do you think I should enable "cache=off" by default ? > Or even remove the option from the command line and always use > O_DIRECT ? > Hi Laurent, Have you done any performance testing? Buffered IO should absolutely beat direct IO simply because buffered IO allows writes to complete before they actually hit disk. I've observed this myself. Plus the host typically has a much larger page cache then the guest so the second level of caching helps an awful lot. Regards, Anthony Liguori > Regards, > Laurent >