aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/multicall.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-27 16:35:37 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-27 16:35:37 +0100
commitbd776061a1a0e119d997b24be7fbf4bcd7603d95 (patch)
tree11f24760a1031f992c8e9de18147b05c32a58b12 /xen/common/multicall.c
parent5893fef229ab62a3da1d437f61313f53a208370a (diff)
downloadxen-bd776061a1a0e119d997b24be7fbf4bcd7603d95.tar.gz
xen-bd776061a1a0e119d997b24be7fbf4bcd7603d95.tar.bz2
xen-bd776061a1a0e119d997b24be7fbf4bcd7603d95.zip
xen: Make all performance counter per-cpu, avoiding the need to update
them with atomic (locked) ops. Conversion here isn't complete in the sense that many places still use the old per-CPU accessors (which are now redundant). Since the patch is already rather big, I'd prefer replacing those in a subsequent patch. While doing this, I also converted x86's multicall macros to no longer require inclusion of asm-offsets.h in the respective C file (on IA64 the use of asm-offsets.h in C sources seems more wide spread, hence there I rather used IA64_ prefixes for the otherwise conflicting performance counter indices). On x86, a few counter increments get moved a little, to avoid duplicate counting of preempted hypercalls. Also, a few counters are being added. IA64 changes only compile-tested, hence somebody doing active IA64 work may want to have a close look at those changes. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/multicall.c')
-rw-r--r--xen/common/multicall.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/common/multicall.c b/xen/common/multicall.c
index 1a43838ca0..c03002256e 100644
--- a/xen/common/multicall.c
+++ b/xen/common/multicall.c
@@ -10,6 +10,7 @@
#include <xen/event.h>
#include <xen/multicall.h>
#include <xen/guest_access.h>
+#include <xen/perfc.h>
#include <asm/current.h>
#include <asm/hardirq.h>
@@ -69,14 +70,18 @@ do_multicall(
guest_handle_add_offset(call_list, 1);
}
+ perfc_incr(calls_to_multicall);
+ perfc_add(calls_from_multicall, nr_calls);
mcs->flags = 0;
return 0;
fault:
+ perfc_incr(calls_to_multicall);
mcs->flags = 0;
return -EFAULT;
preempted:
+ perfc_add(calls_from_multicall, i);
mcs->flags = 0;
return hypercall_create_continuation(
__HYPERVISOR_multicall, "hi", call_list, nr_calls-i);