|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] Re: Getting the page fault count for domU
I'm assuming you're talking about faults through the paging mechanism.
The page fault handling is all done in dom0 user-space, so the number
of faults for a particular vCPU for a given period in time can be
easily tracked by the daemon without modifying hypervisor code. When
a vCPU faults (i.e. trys to access a page that is currently paged
out), it will be paused -- so it's not possible for the vCPU to accrue
additional page faults until the userspace daemon handles the first
one. I'm not sure what your use-case is, but there's probably a
better way of sharing this information with other user-space tools
than through an additional field in struct domain.
Cheers,
-Adin
On Thu, Sep 29, 2011 at 12:13 PM, Chintamani Siddeshwar
<chintamani.sid@xxxxxxxxx> wrote:
> I am thinking of doing something like
>
> 1) Add a field "unsigned long page_fault_count" to struct domain defined in
> in xen/sched.h
>
> 2) Increment this counter mem_paging_domctl(...) defined in
> arch/x_86/mm/mem_paging.c for
> case XEN_DOMCTL_MEM_EVENT_OP_PAGING_EVICT
>
> I will then access this information is available from within struct
> vcpu->domain->page_fault_count.
>
> Please correct me if my chain of thought is wrong or if it is too
> simplistic.
> Looking forward to your valuable comments
>
> thanks
> Chintamani
>
>
>
> --
> View this message in context:
> http://xen.1045712.n5.nabble.com/Getting-the-page-fault-count-for-domU-tp4847541p4853794.html
> Sent from the Xen - Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|