[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] per cpu vhpt stats



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 0e5635d68de38807ed86611d7a2e3bed3b8d5433
# Parent  811c02dbe595993a67aece39f9ca589114d08314
[IA64] per cpu vhpt stats

dump_vhpt_stats: disp usage per cpu.

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
 xen/arch/ia64/xen/vhpt.c |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff -r 811c02dbe595 -r 0e5635d68de3 xen/arch/ia64/xen/vhpt.c
--- a/xen/arch/ia64/xen/vhpt.c  Wed Jun 21 11:15:08 2006 -0600
+++ b/xen/arch/ia64/xen/vhpt.c  Wed Jun 21 11:17:08 2006 -0600
@@ -266,16 +266,21 @@ void zero_vhpt_stats(void)
 
 int dump_vhpt_stats(char *buf)
 {
-       int i;
+       int i, cpu;
        char *s = buf;
-       struct vhpt_lf_entry *v = (void *)VHPT_ADDR;
-       unsigned long vhpt_valid = 0, vhpt_chains = 0;
-
-       for (i = 0; i < VHPT_NUM_ENTRIES; i++, v++) {
-               if (!(v->ti_tag & INVALID_TI_TAG)) vhpt_valid++;
-               if (v->CChain) vhpt_chains++;
-       }
-       s += sprintf(s,"VHPT usage: %ld/%ld (%ld collision chains)\n",
-               vhpt_valid, (unsigned long) VHPT_NUM_ENTRIES, vhpt_chains);
+
+       s += sprintf(s,"VHPT usage (%ld entries):\n",
+                    (unsigned long) VHPT_NUM_ENTRIES);
+
+       for_each_present_cpu (cpu) {
+               struct vhpt_lf_entry *v = __va(per_cpu(vhpt_paddr, cpu));
+               unsigned long vhpt_valid = 0;
+
+               for (i = 0; i < VHPT_NUM_ENTRIES; i++, v++)
+                       if (!(v->ti_tag & INVALID_TI_TAG))
+                               vhpt_valid++;
+               s += sprintf(s,"  cpu %d: %ld\n", cpu, vhpt_valid);
+       }
+
        return s - buf;
 }

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.