* Question about four kinds of pages in struct xc_dominfo
@ 2013-12-31 21:43 Meng Xu
2014-01-03 18:49 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 3+ messages in thread
From: Meng Xu @ 2013-12-31 21:43 UTC (permalink / raw)
To: xen-devel@lists.xen.org
[-- Attachment #1.1: Type: text/plain, Size: 1466 bytes --]
Hi,
I'm trying to print out the "current used" pages of each domU.
I'm reading the xen code and found the data structure xc_dominfo at file
tools/libxc/xenctrl.h.
*I have a simple, maybe very naive question: *
1) What is the difference among *nr_outstanding_pages*, * nr_shared_pages*,
and *nr_paged_pages*?
2) Could anyone point me to a place that I can find the document of the
definition of the structures in xen code, so that I can find those
definition by myself?
I'm new to the xen source and hope you can give me some guide to hack the
xen code.
========The structure is as below======================
"tools/libxc/xenctrl.h"
/*
* DOMAIN MANAGEMENT FUNCTIONS
*/
typedef struct xc_dominfo {
uint32_t domid;
uint32_t ssidref;
unsigned int dying:1, crashed:1, shutdown:1,
paused:1, blocked:1, running:1,
hvm:1, debugged:1;
unsigned int shutdown_reason; /* only meaningful if shutdown==1 */
unsigned long nr_pages; /* current number, not maximum */
unsigned long nr_outstanding_pages;
unsigned long nr_shared_pages;
unsigned long nr_paged_pages;
unsigned long shared_info_frame;
uint64_t cpu_time;
unsigned long max_memkb;
unsigned int nr_online_vcpus;
unsigned int max_vcpu_id;
xen_domain_handle_t handle;
unsigned int cpupool;
} xc_dominfo_t;
Thank you very much for your time and help in these questions!
Happy New Year!
Best,
Meng
[-- Attachment #1.2: Type: text/html, Size: 3273 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question about four kinds of pages in struct xc_dominfo
2013-12-31 21:43 Question about four kinds of pages in struct xc_dominfo Meng Xu
@ 2014-01-03 18:49 ` Konrad Rzeszutek Wilk
2014-01-03 20:17 ` Meng Xu
0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2014-01-03 18:49 UTC (permalink / raw)
To: Meng Xu; +Cc: xen-devel@lists.xen.org
On Tue, Dec 31, 2013 at 04:43:55PM -0500, Meng Xu wrote:
> Hi,
>
> I'm trying to print out the "current used" pages of each domU.
>
> I'm reading the xen code and found the data structure xc_dominfo at file
> tools/libxc/xenctrl.h.
>
> *I have a simple, maybe very naive question: *
> 1) What is the difference among *nr_outstanding_pages*, * nr_shared_pages*,
> and *nr_paged_pages*?
The nr_outstanding_pages is usually zero. It means the amount of
pages that are needed for the guest to be allocated.
The nr_shared_pages - is the number of pages that are shared with other
guests or tools
The nr_ages_pages - that is if you page the pages to swap of a VM.
You need to use xenpaging for that.
> 2) Could anyone point me to a place that I can find the document of the
> definition of the structures in xen code, so that I can find those
> definition by myself?
Um, I usually use 'git annotate' on the file and the commit description
gives me a good idea
>
> I'm new to the xen source and hope you can give me some guide to hack the
> xen code.
>
> ========The structure is as below======================
> "tools/libxc/xenctrl.h"
> /*
> * DOMAIN MANAGEMENT FUNCTIONS
> */
>
> typedef struct xc_dominfo {
> uint32_t domid;
> uint32_t ssidref;
> unsigned int dying:1, crashed:1, shutdown:1,
> paused:1, blocked:1, running:1,
> hvm:1, debugged:1;
> unsigned int shutdown_reason; /* only meaningful if shutdown==1 */
> unsigned long nr_pages; /* current number, not maximum */
> unsigned long nr_outstanding_pages;
> unsigned long nr_shared_pages;
> unsigned long nr_paged_pages;
> unsigned long shared_info_frame;
> uint64_t cpu_time;
> unsigned long max_memkb;
> unsigned int nr_online_vcpus;
> unsigned int max_vcpu_id;
> xen_domain_handle_t handle;
> unsigned int cpupool;
> } xc_dominfo_t;
>
>
> Thank you very much for your time and help in these questions!
> Happy New Year!
You too!
>
> Best,
>
> Meng
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question about four kinds of pages in struct xc_dominfo
2014-01-03 18:49 ` Konrad Rzeszutek Wilk
@ 2014-01-03 20:17 ` Meng Xu
0 siblings, 0 replies; 3+ messages in thread
From: Meng Xu @ 2014-01-03 20:17 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk; +Cc: xen-devel@lists.xen.org
[-- Attachment #1.1: Type: text/plain, Size: 2545 bytes --]
Hi Konrad,
Thank you so much for your advice! Now I get the difference of those three
kinds of pages.
Your advice of using the git annotate is really helpful! :-)
Best,
Meng
2014/1/3 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> On Tue, Dec 31, 2013 at 04:43:55PM -0500, Meng Xu wrote:
> > Hi,
> >
> > I'm trying to print out the "current used" pages of each domU.
> >
> > I'm reading the xen code and found the data structure xc_dominfo at file
> > tools/libxc/xenctrl.h.
> >
> > *I have a simple, maybe very naive question: *
> > 1) What is the difference among *nr_outstanding_pages*, *
> nr_shared_pages*,
> > and *nr_paged_pages*?
>
> The nr_outstanding_pages is usually zero. It means the amount of
> pages that are needed for the guest to be allocated.
>
> The nr_shared_pages - is the number of pages that are shared with other
> guests or tools
>
> The nr_ages_pages - that is if you page the pages to swap of a VM.
> You need to use xenpaging for that.
>
> > 2) Could anyone point me to a place that I can find the document of the
> > definition of the structures in xen code, so that I can find those
> > definition by myself?
>
> Um, I usually use 'git annotate' on the file and the commit description
> gives me a good idea
>
> >
> > I'm new to the xen source and hope you can give me some guide to hack the
> > xen code.
> >
> > ========The structure is as below======================
> > "tools/libxc/xenctrl.h"
> > /*
> > * DOMAIN MANAGEMENT FUNCTIONS
> > */
> >
> > typedef struct xc_dominfo {
> > uint32_t domid;
> > uint32_t ssidref;
> > unsigned int dying:1, crashed:1, shutdown:1,
> > paused:1, blocked:1, running:1,
> > hvm:1, debugged:1;
> > unsigned int shutdown_reason; /* only meaningful if shutdown==1 */
> > unsigned long nr_pages; /* current number, not maximum */
> > unsigned long nr_outstanding_pages;
> > unsigned long nr_shared_pages;
> > unsigned long nr_paged_pages;
> > unsigned long shared_info_frame;
> > uint64_t cpu_time;
> > unsigned long max_memkb;
> > unsigned int nr_online_vcpus;
> > unsigned int max_vcpu_id;
> > xen_domain_handle_t handle;
> > unsigned int cpupool;
> > } xc_dominfo_t;
> >
> >
> > Thank you very much for your time and help in these questions!
> > Happy New Year!
>
> You too!
> >
> > Best,
> >
> > Meng
>
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
>
>
[-- Attachment #1.2: Type: text/html, Size: 4012 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-03 20:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-31 21:43 Question about four kinds of pages in struct xc_dominfo Meng Xu
2014-01-03 18:49 ` Konrad Rzeszutek Wilk
2014-01-03 20:17 ` Meng Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.