From 0559f0a7611bdd336b7297dce179f793b565f148 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Tue, 31 Mar 2009 20:12:44 +0000 Subject: powerpc/pseries: Add dispatch dispersion statistics PHYP tells us how often a shared processor dispatch changed physical cpus. This can highlight performance problems caused by the hypervisor. Signed-off-by: Anton Blanchard Signed-off-by: Paul Mackerras --- arch/powerpc/kernel/lparcfg.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'arch/powerpc/kernel/lparcfg.c') diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c index 182e0f642f36..78b3f7840ade 100644 --- a/arch/powerpc/kernel/lparcfg.c +++ b/arch/powerpc/kernel/lparcfg.c @@ -434,6 +434,21 @@ static void pseries_cmo_data(struct seq_file *m) seq_printf(m, "cmo_page_size=%lu\n", cmo_get_page_size()); } +static void splpar_dispatch_data(struct seq_file *m) +{ + int cpu; + unsigned long dispatches = 0; + unsigned long dispatch_dispersions = 0; + + for_each_possible_cpu(cpu) { + dispatches += lppaca[cpu].yield_count; + dispatch_dispersions += lppaca[cpu].dispersion_count; + } + + seq_printf(m, "dispatches=%lu\n", dispatches); + seq_printf(m, "dispatch_dispersions=%lu\n", dispatch_dispersions); +} + static int pseries_lparcfg_data(struct seq_file *m, void *v) { int partition_potential_processors; @@ -460,6 +475,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) parse_ppp_data(m); parse_mpp_data(m); pseries_cmo_data(m); + splpar_dispatch_data(m); seq_printf(m, "purr=%ld\n", get_purr()); } else { /* non SPLPAR case */ -- cgit v1.2.3-59-g8ed1b