From: Marcelo Tosatti Subject: Re: [PATCH 2/2] kvm: change the dirty page tracking to work with dirty bity Date: Thu, 11 Jun 2009 09:24:11 -0300 Message-ID: <20090611122411.GB3944@amt.cnet> References: <1244651005-18322-1-git-send-email-ieidus@redhat.com> <1244651005-18322-2-git-send-email-ieidus@redhat.com> <1244651005-18322-3-git-send-email-ieidus@redhat.com> <20090610204227.GA12682@amt.cnet> <4A30484E.1040708@redhat.com> <20090611010413.GB15350@amt.cnet> <4A30EA32.7010000@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, avi@redhat.com To: Izik Eidus Return-path: Received: from mx2.redhat.com ([66.187.237.31]:55351 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbZFKOF0 (ORCPT ); Thu, 11 Jun 2009 10:05:26 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5BE5T3K026907 for ; Thu, 11 Jun 2009 10:05:29 -0400 Content-Disposition: inline In-Reply-To: <4A30EA32.7010000@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Jun 11, 2009 at 02:27:46PM +0300, Izik Eidus wrote: > Marcelo Tosatti wrote: >> >> >> What i'm saying is with shadow and NPT (i believe) you can mark a spte >> writable but not dirty, which gives you the ability to know whether >> certain pages have been dirtied. >> > > Isnt this what this patch is doing? Yes, was confused for some reason i don't remember. So making the dirty bit available to the host is a good idea, but would have to check things like faults on out of sync pagetables (where the guest dirty bit might be cleared in parallel, maybe its ok but not sure), verify transfer of dirty bit when zapping is consistent everywhere, etc. So it would be nicer to introduce an optimization to the way dirty bit info is acquired, then you use that to optimize kvm's dirty log ioctl. The link with KSM was that you can consult this dirty info, which is fast, to know if content of pages has changed. But it maybe useless, don't know.