xen-devel
Re: [Xen-devel] [PATCH] Do not set page's count_info directly
Jiang, Yunhong wrote:
Keir Fraser <mailto:keir.fraser@xxxxxxxxxxxxx> wrote:
On 05/03/2009 12:45, "Gianluca Guida" <glguida@xxxxxxxxx> wrote:
On Thu, Mar 5, 2009 at 1:38 PM, Tim Deegan
<Tim.Deegan@xxxxxxxxxx> wrote:
The check doesn't tell you it's a shadow page -- it just tells you it's
*not* allocated in another way. Checking with the mask is OK here,
perhaps with a comment change.
Yes, but this is what the code (in the shadow code) intends to check.
My complete plan is to have this macro and restore the idea of having
a flag for shadow pages because, as for now, the fact that we can't
distinguish clearly a shadow page should be considered a sort of bug,
given the code assumptions. Or at least a good basis for future bugs.
I'm happy for shadow code to have another bit in count_info
for its own use.
I don't think it's good to have other code (e.g., generic page offlining
code) peeking at it, is all. The particular case for a new
flag described
above sounds fine.
The new code is not using that flag anymore, it is use the
page_get_owner_and_reference() to get the owner.
Yes, I was actually thinking about adding it. Turns out that I realized
that it's not the best way to do stuff, but I think that I'll do the
following:
- add a sh_page_is_a_shadow_page() in shadow code to make the code less
confusing (with a small caveat comment about not being perfectly precise).
- exercise my English skills by writing a comment in page_info that
summarizes this thread findings about current use if count_info and
shadow pages.
Thanks,
Gianluca
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|