]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
x86/irq: Count Hyper-V reenlightenment interrupts
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 24 Jan 2018 13:23:35 +0000 (14:23 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 30 Jan 2018 22:55:33 +0000 (23:55 +0100)
Hyper-V reenlightenment interrupts arrive when the VM is migrated, While
they are not interesting in general it's important when L2 nested guests
are running.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: kvm@vger.kernel.org
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
Cc: Roman Kagan <rkagan@virtuozzo.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: devel@linuxdriverproject.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Cathy Avery <cavery@redhat.com>
Cc: Mohammed Gamal <mmorsy@redhat.com>
Link: https://lkml.kernel.org/r/20180124132337.30138-6-vkuznets@redhat.com
arch/x86/hyperv/hv_init.c
arch/x86/include/asm/hardirq.h
arch/x86/kernel/irq.c

index e4377e2f2a10b0892f70738443a0bb21be603b98..a3adece392f14a6d6135e33a156bf9df81c7f494 100644 (file)
@@ -147,6 +147,8 @@ __visible void __irq_entry hyperv_reenlightenment_intr(struct pt_regs *regs)
 {
        entering_ack_irq();
 
+       inc_irq_stat(irq_hv_reenlightenment_count);
+
        schedule_delayed_work(&hv_reenlightenment_work, HZ/10);
 
        exiting_irq();
index 51cc979dd3642ff4ad743ba4efcd38c97a6877b9..7c341a74ec8c49c090257d9aa192bc8f6afa9517 100644 (file)
@@ -38,6 +38,9 @@ typedef struct {
 #if IS_ENABLED(CONFIG_HYPERV) || defined(CONFIG_XEN)
        unsigned int irq_hv_callback_count;
 #endif
+#if IS_ENABLED(CONFIG_HYPERV)
+       unsigned int irq_hv_reenlightenment_count;
+#endif
 } ____cacheline_aligned irq_cpustat_t;
 
 DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
index 68e1867cca8045d0ed728ffc6b75a866c25484ed..45fb4d2565f80a451b04fbf9976f69a165efb2d3 100644 (file)
@@ -141,6 +141,15 @@ int arch_show_interrupts(struct seq_file *p, int prec)
                                   irq_stats(j)->irq_hv_callback_count);
                seq_puts(p, "  Hypervisor callback interrupts\n");
        }
+#endif
+#if IS_ENABLED(CONFIG_HYPERV)
+       if (test_bit(HYPERV_REENLIGHTENMENT_VECTOR, system_vectors)) {
+               seq_printf(p, "%*s: ", prec, "HRE");
+               for_each_online_cpu(j)
+                       seq_printf(p, "%10u ",
+                                  irq_stats(j)->irq_hv_reenlightenment_count);
+               seq_puts(p, "  Hyper-V reenlightenment interrupts\n");
+       }
 #endif
        seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
 #if defined(CONFIG_X86_IO_APIC)