WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: Getting the page fault count for domU

To: Chintamani Siddeshwar <chintamani.sid@xxxxxxxxx>
Subject: Re: [Xen-devel] Re: Getting the page fault count for domU
From: Adin Scannell <adin@xxxxxxxxxxxxxx>
Date: Fri, 30 Sep 2011 17:03:53 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 30 Sep 2011 14:06:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1317312832330-4853794.post@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1317172992048-4847541.post@xxxxxxxxxxxxx> <1317312832330-4853794.post@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>