[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-devel
Subject:    Re: [Xen-devel] Re: Getting the page fault count for domU
From:       Adin Scannell <adin () gridcentric ! ca>
Date:       2011-09-30 21:03:53
Message-ID: CAAJKtqpQ7RC2=Mz1B9V1t4HPKPx_9kpxd+xL9mPoE0WCqR2fEA () mail ! gmail ! com
[Download RAW message or body]

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@gmail.com> 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@lists.xensource.com
> http://lists.xensource.com/xen-devel
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic