[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [PATCH] Do not set page's count_info directly



Keir Fraser <mailto:keir.fraser@xxxxxxxxxxxxx> wrote:
> On 05/03/2009 12:32, "Gianluca Guida" <glguida@xxxxxxxxx> wrote:
> 
>>> Also currently shadow code assume count_info is 0 for shadow page,
>>> however, this is invalid after the new flags. Change some assert in
>>> shadow code. 
>> 
>> Yes, that's correct. I find, though, (count_info & PGC_count_mask !=
>> 0) as a check if the page is a shadow *very* confusing. Could you
>> define a macro with something like page_is_a_shadow_page() and hide
>> this mm.c dirty secret?
> 
> This would be a shadow-code-specific macro. In general count_mask==0 can
> also mean the page is free, for example.

Maybe I'm wrong, but anonymous page will have count_mask==0 while they are 
allocated.

Currently the only way that we can make sure the guest is free is through the 
boot allocator bitmap. When the bit is clear, the page is free.
When the bit is set, and the count_mask!=0, then it is owned by someone like 
guest ram, p2m table etc. if the count_mask==0, then it is either a shadow page 
or a anoynymous page.

Or do I missed anything?

Thanks
Yunhong Jiang


> 
> -- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.