Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FzYas-0003S0-1E for qemu-devel@nongnu.org; Sun, 09 Jul 2006 08:41:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FzYap-0003Qy-Pt for qemu-devel@nongnu.org; Sun, 09 Jul 2006 08:41:01 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FzYap-0003Qo-JC for qemu-devel@nongnu.org; Sun, 09 Jul 2006 08:40:59 -0400 Received: from [131.111.8.137] (helo=ppsw-7.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FzYbg-0005XT-QA for qemu-devel@nongnu.org; Sun, 09 Jul 2006 08:41:53 -0400 From: Mark Williamson Subject: Re: [Qemu-devel] balloon driver Date: Sun, 9 Jul 2006 13:42:02 +0100 References: <946a3fda0607041958p2e5daab3o2c6d3f633aafc089@mail.gmail.com> <200607090232.55272.mark.williamson@cl.cam.ac.uk> <20060709030215.GA10402@mail.shareable.org> In-Reply-To: <20060709030215.GA10402@mail.shareable.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607091342.03263.mark.williamson@cl.cam.ac.uk> 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 > > Worse, the guest might decide to swap out a page that's already > > swapped in by the host, forcing it to be read in again only to be > > immediately written out to disk by the guest :-( > > ...unless the guest's disk I/O is with simulated DMA or recognisable > block-copy instruction sequences, and doesn't look at the data. In > that case the emulator can, in principle, keep track of where pages > are copied around without being examined, and avoid actually swapping > them in. > > Probably not worth the complexity. Another solution, taken by the Disco VMM was to provide a special virtual disk device for the swap device which fakes out swapping behaviour - accesses to that device are always going to be swaps, so you can guarantee to do the right thing without having to trace and interpret behaviour. That said, I like your idea of not committing IOs for DMA-ed pages than have not been inspected, but one would have to be careful to make sure that true page-size DMA writes of data do still hit the disk in a timely fashion. Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel!