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

Re: [Xen-devel] Question about the memory layout of xen hypervisor, dom0 and domU



Hi Dario,

Thank you so much for your help and information! It is really helpful! 


> I have a question about the memory layout of the Xen hypervisor, dom0
> and domU.
>
>
> *The goal I want to achieve is:
> I want to show which RAM area is used by hypervisor, which RAM area is
> used by dom0, which RAM area is used by each domU (PV guest domain).
>
> I hope to know the above information when xen is booted as well as
> when xen is running some domUs.
>
Mmm... Where (hypervisor, dom0/domu kernel space, user space) and for
what reason you need that?


I'm doing research on real time systems, especially on real time scheduling and analysis. I'm considering the cache effect on the scheduling. For example, what is the performance of different scheduling policies when cache effect is considered. As you know, the cache location of a program/domain depends on the memory address of the program/domain, so I'm interested in the memory layout of domains/hypervisor and want to investigate the cache interference among domains and hypervisor. 

 
I'm asking because, at some point, I needed a _similar_ information, and
wrote this:

http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=ae763e4224304983a1cde2fbb3d6e0c4d60b2688

It's probably not exactly what you mean, but it has the capability of
showing who is using some MFNs. 
The point is I only needed it for debugging/understanding purposes so,
if your aim is different, it may not fit.


Thank you very much for your pointer! I applied your patch and it works very well for the guest domains!  I can dump the pfn->mfn for each guest domain. But I also have several questions about your patch and the output of the program:
1) I can use the command "xen-mfndump  dump-p2m 3" to dump dom3's pfn->mfn; But when I use the command "xen-mfndump  dump-p2m 0" to dump the domain 0's pfn->mfn, it reports error as follows:
xc: error: Could not map the shared info frame (MFN 0xcecfd) (3 = No such process): Internal error
xc: error: Could not map domain 0 memory information: Internal error

Did I miss something if xen-mfndump does have such function. If the xen-mfndump cannot be used to dump the machine address of dom0 and hypervisor, is there any other tool I can use?  

2) I found that the page frames that are used as L1 table are not always continuous (some of them are continuous). For example:
  pfn=0x3844 ==> mfn=0x13d1be (type 0x9) [mapped] [pinned] L1 table
  pfn=0x3845 ==> mfn=0x13d1bd (type 0x0) [mapped]
  pfn=0x3846 ==> mfn=0x13d1bc (type 0x0) [mapped]
  pfn=0x3847 ==> mfn=0x13d1bb (type 0x0) [mapped]
  pfn=0x3848 ==> mfn=0x13d1ba (type 0x0) [mapped]
  pfn=0x3849 ==> mfn=0x13d1b9 (type 0x0) [mapped]
  pfn=0x384a ==> mfn=0x13d1b8 (type 0x0) [mapped]
  pfn=0x384b ==> mfn=0x13d1b7 (type 0x0) [mapped]
  pfn=0x384c ==> mfn=0x13d1b6 (type 0x0) [mapped]
  pfn=0x384d ==> mfn=0x13d1b5 (type 0x0) [mapped]
  pfn=0x384e ==> mfn=0x13d1b4 (type 0x0) [mapped]
  pfn=0x384f ==> mfn=0x13d1b3 (type 0x0) [mapped]
  pfn=0x3850 ==> mfn=0x13d1b2 (type 0x9) [mapped] [pinned] L1 table

I don't quite understand the reason why the page frames that are used as L1 table are not continuous. In my understanding, the memory allocation will try to allocate a bulk of memory first instead of distribute them. I think I must misunderstand something. Could you help me point it out? 

Thank you so much for your help!

Best,

Meng

-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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