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

[Xen-devel] [PATCH] x86: add perf counter for pointless updates of writa

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: add perf counter for pointless updates of writable pages through a hypercall
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 12 Jun 2008 15:36:20 +0100
Delivery-date: Thu, 12 Jun 2008 07:36:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2008-06-12/xen/arch/x86/mm.c
===================================================================
--- 2008-06-12.orig/xen/arch/x86/mm.c   2008-06-12 09:04:50.000000000 +0200
+++ 2008-06-12/xen/arch/x86/mm.c        2008-06-12 09:08:36.000000000 +0200
@@ -2606,6 +2606,8 @@ int do_mmu_update(
                 if ( unlikely(!get_page_type(page, PGT_writable_page)) )
                     break;
 
+                perfc_incr(writable_mmu_updates);
+
                 okay = paging_write_guest_entry(v, va, req.val, _mfn(mfn));
 
                 put_page_type(page);
Index: 2008-06-12/xen/include/asm-x86/perfc_defn.h
===================================================================
--- 2008-06-12.orig/xen/include/asm-x86/perfc_defn.h    2008-06-10 
18:00:41.000000000 +0200
+++ 2008-06-12/xen/include/asm-x86/perfc_defn.h 2008-06-12 09:08:36.000000000 
+0200
@@ -23,6 +23,7 @@ PERFCOUNTER(calls_to_mmuext_op,         
 PERFCOUNTER(num_mmuext_ops,             "mmuext ops")
 PERFCOUNTER(calls_to_mmu_update,        "calls to mmu_update")
 PERFCOUNTER(num_page_updates,           "page updates")
+PERFCOUNTER(writable_mmu_updates,       "mmu_update-s of writable pages")
 PERFCOUNTER(calls_to_update_va,         "calls to update_va_map")
 PERFCOUNTER(page_faults,            "page faults")
 PERFCOUNTER(copy_user_faults,       "copy_user faults")




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: add perf counter for pointless updates of writable pages through a hypercall, Jan Beulich <=