Hi How do we get the number of page faults done by a guest in a scheduling epoch? Assuming only one VCPU per guest, can I get it from vcpu_info[]? I hope this is not a vey trivial question :) thanks Chintu -- View this message in context: http://xen.1045712.n5.nabble.com/Getting-the-page-fault-count-for-domU-tp4847541p4847541.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
Chintamani Siddeshwar
2011-Sep-29 16:13 UTC
[Xen-devel] Re: Getting the page fault count for domU
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
Adin Scannell
2011-Sep-30 21:03 UTC
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@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
Chintamani Siddeshwar
2011-Oct-02 00:48 UTC
[Xen-devel] Re: Getting the page fault count for domU
Thanks a lot Adin. Can you please tell me, which daemon should I look for? I am trying to see whether it makes sense to include this page-fault count while scheduling guests (vcpus), to achieve better performance isolation among guests. That is why I am interested in changing XEN''s code - If the code changes that I suggested wont work, can you please suggest me any alternatives? That will be really helpful. thanks Chintamani -- View this message in context: http://xen.1045712.n5.nabble.com/Getting-the-page-fault-count-for-domU-tp4847541p4861071.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
Tim Deegan
2011-Oct-03 09:31 UTC
Re: [Xen-devel] Re: Getting the page fault count for domU
Hi, At 17:48 -0700 on 01 Oct (1317491281), Chintamani Siddeshwar wrote:> I am trying to see whether it makes sense to include this page-fault count > while scheduling guests (vcpus), to achieve better performance isolation > among guests. That is why I am interested in changing XEN''s code - If the > code changes that I suggested wont work, can you please suggest me any > alternatives? That will be really helpful.Are you looking to count: - page faults in the guest (that would have happened on a real server); - page faults caused by the hypervisor (i.e. due to shadow pagetables); or - page faults caused by Xen tools paging the guest memory to disk? Or something else? Not all pagefaults are easy to count, by the way. Tim. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chintamani Siddeshwar
2011-Oct-03 13:37 UTC
[Xen-devel] Re: Getting the page fault count for domU
I am interested in counting the number of page-faults in the guest - page-faults that result in a disk I/O. Also when would XEN tools page a guest memory to disk? Is it a manual process (by running "xenpaging" command) or is it a performance enhancement added in recent versions of XEN? I am looking forward to your valuable comments/suggestions. thanks Chintamani -- View this message in context: http://xen.1045712.n5.nabble.com/Getting-the-page-fault-count-for-domU-tp4847541p4864887.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
Tim Deegan
2011-Oct-03 13:43 UTC
Re: [Xen-devel] Re: Getting the page fault count for domU
At 06:37 -0700 on 03 Oct (1317623870), Chintamani Siddeshwar wrote:> I am interested in counting the number of page-faults in the guest - > page-faults that result in a disk I/O.You will have to do that from inside the guest - only the guest''s OS knows which of its page-faults result in I/O, and on modern (EPT/RVI) hardware, Xen doesn''t even see most guest page-faults.> Also when would XEN tools page a guest memory to disk? Is it a manual > process (by running "xenpaging" command) or is it a performance enhancement > added in recent versions of XEN?Only when the xenpaging daemon is running. It is definitely not a performance enhancement (memory pressure is better dealt with by the guest) but is useful as a backstop if you''re overcommitting memory some other way. Tim. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chintamani Siddeshwar
2011-Oct-03 13:55 UTC
[Xen-devel] Re: Getting the page fault count for domU
Okay. Is it possible to get this info from within Dom0, because Dom0 handles disk paging. Would it help to look at the backend dd''s or the xend? thanks Chintamani On Mon, Oct 3, 2011 at 8:44 AM, Tim Deegan-6 [via Xen] < ml-node+s1045712n4864909h61@n5.nabble.com> wrote:> At 06:37 -0700 on 03 Oct (1317623870), Chintamani Siddeshwar wrote: > > I am interested in counting the number of page-faults in the guest - > > page-faults that result in a disk I/O. > > You will have to do that from inside the guest - only the guest''s OS > knows which of its page-faults result in I/O, and on modern (EPT/RVI) > hardware, Xen doesn''t even see most guest page-faults. > > > Also when would XEN tools page a guest memory to disk? Is it a manual > > process (by running "xenpaging" command) or is it a performance > enhancement > > added in recent versions of XEN? > > Only when the xenpaging daemon is running. It is definitely not a > performance enhancement (memory pressure is better dealt with by the > guest) but is useful as a backstop if you''re overcommitting memory some > other way. > > Tim. > > _______________________________________________ > Xen-devel mailing list > [hidden email] <http://user/SendEmail.jtp?type=node&node=4864909&i=0> > http://lists.xensource.com/xen-devel > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://xen.1045712.n5.nabble.com/Getting-the-page-fault-count-for-domU-tp4847541p4864909.html > To unsubscribe from Getting the page fault count for domU, click here<http://xen.1045712.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4847541&code=Y2hpbnRhbWFuaS5zaWRAZ21haWwuY29tfDQ4NDc1NDF8MTYwNDQ2Nzc4MQ==>. > >-- View this message in context: http://xen.1045712.n5.nabble.com/Getting-the-page-fault-count-for-domU-tp4847541p4864950.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
Tim Deegan
2011-Oct-03 14:07 UTC
Re: [Xen-devel] Re: Getting the page fault count for domU
Please don''t top-post. At 06:55 -0700 on 03 Oct (1317624948), Chintamani Siddeshwar wrote:> Okay. > Is it possible to get this info from within Dom0, because Dom0 handles disk > paging.Not unless dom0 can figure out which parts of the guest''s disk I/O is paging and which not. In some OSes that might be easier than others, but it will always need knowledge of the guest OS internals and configuration. Tim.> On Mon, Oct 3, 2011 at 8:44 AM, Tim Deegan-6 [via Xen] < > ml-node+s1045712n4864909h61@n5.nabble.com> wrote: > > > At 06:37 -0700 on 03 Oct (1317623870), Chintamani Siddeshwar wrote: > > > I am interested in counting the number of page-faults in the guest - > > > page-faults that result in a disk I/O. > > > > You will have to do that from inside the guest - only the guest''s OS > > knows which of its page-faults result in I/O, and on modern (EPT/RVI) > > hardware, Xen doesn''t even see most guest page-faults. > > > > > Also when would XEN tools page a guest memory to disk? Is it a manual > > > process (by running "xenpaging" command) or is it a performance > > enhancement > > > added in recent versions of XEN? > > > > Only when the xenpaging daemon is running. It is definitely not a > > performance enhancement (memory pressure is better dealt with by the > > guest) but is useful as a backstop if you''re overcommitting memory some > > other way. > > > > Tim._______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Possibly Parallel Threads
- [PATCH] xenpaging:add a new array to speed up page-in in xenpaging
- [PATCH] xenpaging:add the dealing of MEM_EVENT_FLAG_EVICT_FAIL request in
- [PATCH] xenpaging: remove XOPEN_SOURCE
- [PATCH] xenpaging: add error code to indicate iommem passthrough
- [PATCH 0 of 2] xenpaging:speed up page-in