Skip to content

Commit 929320e

Browse files
committed
x86: Add proper vector accounting for HYPERVISOR_CALLBACK_VECTOR
HyperV abuses a device interrupt to account for the HYPERVISOR_CALLBACK_VECTOR. Provide proper accounting as we have for the other vectors as well. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: K. Y. Srinivasan <[email protected]> Cc: x86 <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 3611587 commit 929320e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

arch/x86/include/asm/hardirq.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ typedef struct {
3333
#ifdef CONFIG_X86_MCE_THRESHOLD
3434
unsigned int irq_threshold_count;
3535
#endif
36+
#if defined(CONFIG_HYPERV) || defined(CONFIG_XEN)
37+
unsigned int irq_hv_callback_count;
38+
#endif
3639
} ____cacheline_aligned irq_cpustat_t;
3740

3841
DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);

arch/x86/kernel/irq.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ int arch_show_interrupts(struct seq_file *p, int prec)
124124
for_each_online_cpu(j)
125125
seq_printf(p, "%10u ", per_cpu(mce_poll_count, j));
126126
seq_printf(p, " Machine check polls\n");
127+
#endif
128+
#if defined(CONFIG_HYPERV) || defined(CONFIG_XEN)
129+
seq_printf(p, "%*s: ", prec, "THR");
130+
for_each_online_cpu(j)
131+
seq_printf(p, "%10u ", irq_stats(j)->irq_hv_callback_count);
132+
seq_printf(p, " Hypervisor callback interrupts\n");
127133
#endif
128134
seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
129135
#if defined(CONFIG_X86_IO_APIC)

0 commit comments

Comments
 (0)