RE: [patch 22/26] x86: Add proper vector accounting for HyperV

From: KY Srinivasan
Date: Tue Feb 25 2014 - 07:25:51 EST




> -----Original Message-----
> From: Thomas Gleixner [mailto:tglx@xxxxxxxxxxxxx]
> Sent: Sunday, February 23, 2014 1:40 PM
> To: LKML
> Cc: Ingo Molnar; Peter Zijlstra; x86; Konrad Rzeszutek Wilk; KY Srinivasan
> Subject: [patch 22/26] x86: Add proper vector accounting for HyperV
>
> HyperV abuses a device interrupt to account for the
> HYPERVISOR_CALLBACK_VECTOR.
>
> Provide proper accounting as we have for the other vectors as well.

Thomas,

Thank you for cleaning up this code.

Regards,

K. Y
>
> Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: x86 <x86@xxxxxxxxxx>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> Cc: "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>
> ---
> arch/x86/include/asm/hardirq.h | 3 +++
> arch/x86/kernel/irq.c | 6 ++++++
> 2 files changed, 9 insertions(+)
>
> Index: tip/arch/x86/include/asm/hardirq.h
> ==========================================================
> =========
> --- tip.orig/arch/x86/include/asm/hardirq.h
> +++ tip/arch/x86/include/asm/hardirq.h
> @@ -33,6 +33,9 @@ typedef struct {
> #ifdef CONFIG_X86_MCE_THRESHOLD
> unsigned int irq_threshold_count;
> #endif
> +#if defined(CONFIG_HYPERV) || defined(CONFIG_XEN)
> + unsigned int irq_hv_callback_count;
> +#endif
> } ____cacheline_aligned irq_cpustat_t;
>
> DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
> Index: tip/arch/x86/kernel/irq.c
> ==========================================================
> =========
> --- tip.orig/arch/x86/kernel/irq.c
> +++ tip/arch/x86/kernel/irq.c
> @@ -125,6 +125,12 @@ int arch_show_interrupts(struct seq_file
> seq_printf(p, "%10u ", per_cpu(mce_poll_count, j));
> seq_printf(p, " Machine check polls\n"); #endif
> +#if defined(CONFIG_HYPERV) || defined(CONFIG_XEN)
> + seq_printf(p, "%*s: ", prec, "THR");
> + for_each_online_cpu(j)
> + seq_printf(p, "%10u ", irq_stats(j)->irq_hv_callback_count);
> + seq_printf(p, " Hypervisor callback interrupts\n"); #endif
> seq_printf(p, "%*s: %10u\n", prec, "ERR",
> atomic_read(&irq_err_count)); #if defined(CONFIG_X86_IO_APIC)
> seq_printf(p, "%*s: %10u\n", prec, "MIS",
> atomic_read(&irq_mis_count));
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/