From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gianluca Guida Subject: Re: Re: [PATCH]Add a flag for shadow pages Date: Wed, 04 Mar 2009 16:32:11 +0000 Message-ID: <49AEAD0B.7040301@eu.citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jiang, Yunhong" Cc: Tim Deegan , "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org Jiang, Yunhong wrote: > Thanks for your really quick-hand implementation. I will update my another patch accordingly tomorrow. > > So still one question to the two assertion (or to Tim??) in sh_rm_write_access_from_sl1p()/sh_put_ref(). What's the potential error to be protected by this checking? If page is a shadow, it's count_info will always be 0, right? Or it is just a sanity checking? They're sanity checking. Checks are there to be sure that the page is a shadow page. It used to be "->mbz == 0", which was clearer, in the old page_info model. In the sh_rm_write_access_from_sl1p(), the check is there to ensure that the page is *still* a shadow page. As for current code, though, that check should be useless. I actually think that having a more precise way of knowing when a page is a shadow page is definitely needed, for debugging or even in case the shadow allocation becomes more dynamic in the future. > I need change this is because, if we mark a page offline, then the count_info is not 0, even for shadow page. Can I just checking the count_mask here? Ehr, I am not following the discussions about your patch, but I suppose you set the page off-line after all references and uses of the page, even inside shadows, are removed. Or the count_info is != 0 to signal that the page is going offline? Thanks, Gianluca