From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm tools: Use mmap for working with disk image V2 Date: Sun, 10 Apr 2011 11:36:14 +0300 Message-ID: <4DA16BFE.9090400@redhat.com> References: <1302351248-4853-1-git-send-email-levinsasha928@gmail.com> <5F38320E-5F9C-4681-B5FD-3B9740AB3406@suse.de> <4DA16721.9080808@redhat.com> <20110410082321.GD17809@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Graf , Sasha Levin , penberg@kernel.org, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38225 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753040Ab1DJIgY (ORCPT ); Sun, 10 Apr 2011 04:36:24 -0400 In-Reply-To: <20110410082321.GD17809@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/10/2011 11:23 AM, Gleb Natapov wrote: > > > > A creative idea, but I don't think it will work. On EPT hosts we > > don't have accessed/dirty bits so you have to incur at least write > > faults to track dirty data and perhaps read faults to gather recency > > information. On non-EPT you have to scan page tables to find out > > what you have to write out, and flush TLBs. Cache misses, which > > you'd expect there to be quite a few, would stall the vcpu (unless > > you use asynchronous page faults) and contribute less information to > > the host than virtio-blk (location of access but not size). Write > > misses are converted to read-modify-write operations. > > > Guest kernel can keep track of all modified sectors and pass it to > hypervisor with sync command. Should probably do the same for reads, to take advantage of batching. This can be easily implemented using the qemu ivshmem device, if someone wants to try it out. -- error compiling committee.c: too many arguments to function