From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JyqLH-0004kv-IS for qemu-devel@nongnu.org; Wed, 21 May 2008 11:35:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JyqLG-0004jp-SZ for qemu-devel@nongnu.org; Wed, 21 May 2008 11:35:03 -0400 Received: from [199.232.76.173] (port=59989 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JyqLG-0004jP-BJ for qemu-devel@nongnu.org; Wed, 21 May 2008 11:35:02 -0400 Received: from mail2.shareable.org ([80.68.89.115]:40533) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JyqLE-0003jX-Se for qemu-devel@nongnu.org; Wed, 21 May 2008 11:35:01 -0400 Date: Wed, 21 May 2008 16:34:54 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: [PATCH][v2] Align file accesses with cache=off (O_DIRECT) Message-ID: <20080521153454.GB20527@shareable.org> References: <200805210205.37432.paul@codesourcery.com> <4833778C.4030209@codemonkey.ws> <4833DC3F.8000604@suse.de> <20080521122629.GA14416@shareable.org> <48341783.3060204@qumranet.com> <20080521134154.GA15210@shareable.org> <483429EB.7070705@codemonkey.ws> <48342F05.2090603@qumranet.com> <48343106.4070801@codemonkey.ws> <48343844.1050107@qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48343844.1050107@qumranet.com> 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 Cc: Blue Swirl , Laurent Vivier , Paul Brook Avi Kivity wrote: > Here's a summary of the use cases I saw so far: > > - casual use, no critical data: write back cache > > - backing file shared among many guests: read-only, cached > > - desktop system, but don't lose my data: O_SYNC > (significant resources on the host) > > - dedicated virtualization engine: O_DIRECT > (most host resources assigned to guests) Sounds alright, but on _my_ desktop system (a laptop), I would use O_DIRECT. There isn't enough RAM in my system to be happy duplicating data in guests and hosts at the same time. VMs are quite demanding on RAM. However, if you find a way to map host cached pages into the guest without copying - so sharing the RAM - that would be excellent. It can be done in principle, by remapping pages to satisfy IDE/SCSI DMA requests. I don't know if it would be fast enough. Perhaps it would work better in KVM than QEMU. -- Jamie