Skip to contentSkip to conversation

_domain in page_info structure

DISCUSSION jeet 2 participants 2 messages Mar 27, 2007

lore
Share & tools
lore

jeet

author
#0 lore raw

Hi All,

I am looking into the get_page() function implementation in Xen where I encounter the reference to _domain

nd = page->u.inuse._domain;

what this field is used for?

I found comment in source ode about it

/* Meaning of the _domain field in shadow pages
* --------------------------------------------
*
* In shadow pages, this field will always have its least significant bit
* set. This ensures that all attempts to get_page() will fail (as all
* valid pickled domain pointers have a zero for their least significant bit).
* Instead, the remaining upper bits are used to record the shadow generation
* counter when the shadow was created.
*/

But I am not able to understand this.What is actual significance of this variable?

Please provide your valuable replies.

jeet

__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

#1 lore raw
Quoted 3 lines · jeet

nd = page->u.inuse._domain;

what this field is used for?

The comment beside the definition of the field says:
/* Owner of this page (NULL if page is anonymous). */

Quoted 9 lines

/* Meaning of the _domain field in shadow pages
* --------------------------------------------
*
* In shadow pages, this field will always have its least significant bit
* set. This ensures that all attempts to get_page() will fail (as all
* valid pickled domain pointers have a zero for their least significant bit).
* Instead, the remaining upper bits are used to record the shadow generation
* counter when the shadow was created.
*/

This comment is from 3.0.4 and was never very useful, as IIRC the generation cuonters it refers to were never implemented in the main tree. Shadow pages have their own entirely separate version of the page_info struct now.

Cheers,

Tim.

Signature · 2 lines
Tim Deegan <[email protected]>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508