提交 0559f0a7 编写于 作者: A Anton Blanchard 提交者: Paul Mackerras

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: NAnton Blanchard <anton@samba.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 1f8737aa
...@@ -125,7 +125,7 @@ struct lppaca { ...@@ -125,7 +125,7 @@ struct lppaca {
// NOTE: This value will ALWAYS be zero for dedicated processors and // NOTE: This value will ALWAYS be zero for dedicated processors and
// will NEVER be zero for shared processors (ie, initialized to a 1). // will NEVER be zero for shared processors (ie, initialized to a 1).
volatile u32 yield_count; // PLIC increments each dispatchx00-x03 volatile u32 yield_count; // PLIC increments each dispatchx00-x03
u32 reserved6; volatile u32 dispersion_count; // dispatch changed phys cpu x04-x07
volatile u64 cmo_faults; // CMO page fault count x08-x0F volatile u64 cmo_faults; // CMO page fault count x08-x0F
volatile u64 cmo_fault_time; // CMO page fault time x10-x17 volatile u64 cmo_fault_time; // CMO page fault time x10-x17
u8 reserved7[104]; // Reserved x18-x7F u8 reserved7[104]; // Reserved x18-x7F
......
...@@ -434,6 +434,21 @@ static void pseries_cmo_data(struct seq_file *m) ...@@ -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()); 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) static int pseries_lparcfg_data(struct seq_file *m, void *v)
{ {
int partition_potential_processors; int partition_potential_processors;
...@@ -460,6 +475,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v) ...@@ -460,6 +475,7 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
parse_ppp_data(m); parse_ppp_data(m);
parse_mpp_data(m); parse_mpp_data(m);
pseries_cmo_data(m); pseries_cmo_data(m);
splpar_dispatch_data(m);
seq_printf(m, "purr=%ld\n", get_purr()); seq_printf(m, "purr=%ld\n", get_purr());
} else { /* non SPLPAR case */ } else { /* non SPLPAR case */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册