Received: by 10.223.176.5 with SMTP id f5csp498175wra; Tue, 30 Jan 2018 15:05:52 -0800 (PST) X-Google-Smtp-Source: AH8x226vsAWcrrJxvte4Z0uXLdARnItQfdvlNIHBPwLfiwRNJsfas6bmzAzR0KFD02Trn4D2w0ED X-Received: by 10.98.17.193 with SMTP id 62mr31608062pfr.126.1517353552862; Tue, 30 Jan 2018 15:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517353552; cv=none; d=google.com; s=arc-20160816; b=VaqYGt4PA/nkTtnRWTit85YZceY5el/Ylq5Vru9vods4F1DPRQChNiFBH+rT/0IF0x rTHYL/smHp7+6MLbUDHR5RkxnUmCRBXJm5b83+C2vglaXRk3oHOkm4Z8Z1Ec9EUYuvQd dIt3siSL+oiJKWhHm7I0T3fqwpiDCq9Sb7x92FCnfzxJEkaJ5I4wY804IogIFZRRAzL7 svPg1EKQkmDciMzUMYLeR6VIvfUAYJFfG0uMTSfs3DHJqsRzde73BtoBSOVkL7cwXFGW 8dXzvOC8eaGfpU4d3+Fw83frIikFDiUy8xTn2pHkRoVKGVvYddXK1xYovyRzS+CTrsT0 4h0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=0kaSFXmjRTgjL803benc+hFRV+vAkFybgeMzyxOVoXQ=; b=nnhmJ4mrCscaEwlMBZsD+jHk4nQyDO1U/ZdH4JStCkiJTUW41ak2mIxrvOlpsKDbzY 3tfdnVvrk1NUrBORT+qEKyviSUt3zrtFZr57SN4vIucc2TBsTWB8fuDfIA6Vy2QNsB00 5WMa5qhCuGTU/GCotCWlC2rM9GG3RBvxbuyFCVZNtB/CmndbabCGQKUsl6N6I7uTfx6r yjQH11PP58KjH2JrwJwFr1iayYyMpBOlknQzTq3Y95peVuFZHep57xBXg5G67pDuhlh5 UeLMFmUX3nlcruYSzj34ILGhT8z45oikzw1K/vELCbBUGtfYbsyL3eWT29h5v8/95lSe EW1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j61-v6si2576086plb.108.2018.01.30.15.05.38; Tue, 30 Jan 2018 15:05:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754087AbeA3XDh (ORCPT + 99 others); Tue, 30 Jan 2018 18:03:37 -0500 Received: from terminus.zytor.com ([65.50.211.136]:41783 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753600AbeA3XDf (ORCPT ); Tue, 30 Jan 2018 18:03:35 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w0UN2RX6011749; Tue, 30 Jan 2018 15:02:27 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w0UN2RJM011746; Tue, 30 Jan 2018 15:02:27 -0800 Date: Tue, 30 Jan 2018 15:02:27 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Vitaly Kuznetsov Message-ID: Cc: sthemmin@microsoft.com, mmorsy@redhat.com, Michael.H.Kelley@microsoft.com, pbonzini@redhat.com, mingo@kernel.org, kys@microsoft.com, vkuznets@redhat.com, cavery@redhat.com, linux-kernel@vger.kernel.org, luto@kernel.org, hpa@zytor.com, rkrcmar@redhat.com, haiyangz@microsoft.com, tglx@linutronix.de, rkagan@virtuozzo.com Reply-To: mmorsy@redhat.com, sthemmin@microsoft.com, Michael.H.Kelley@microsoft.com, kys@microsoft.com, pbonzini@redhat.com, mingo@kernel.org, linux-kernel@vger.kernel.org, cavery@redhat.com, vkuznets@redhat.com, hpa@zytor.com, luto@kernel.org, rkrcmar@redhat.com, rkagan@virtuozzo.com, tglx@linutronix.de, haiyangz@microsoft.com In-Reply-To: <20180124132337.30138-6-vkuznets@redhat.com> References: <20180124132337.30138-6-vkuznets@redhat.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/hyperv] x86/irq: Count Hyper-V reenlightenment interrupts Git-Commit-ID: 51d4e5daa32808df4d50db511d167fde19fa114e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 51d4e5daa32808df4d50db511d167fde19fa114e Gitweb: https://git.kernel.org/tip/51d4e5daa32808df4d50db511d167fde19fa114e Author: Vitaly Kuznetsov AuthorDate: Wed, 24 Jan 2018 14:23:35 +0100 Committer: Thomas Gleixner CommitDate: Tue, 30 Jan 2018 23:55:33 +0100 x86/irq: Count Hyper-V reenlightenment interrupts 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 Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Cc: Stephen Hemminger Cc: kvm@vger.kernel.org Cc: Radim Krčmář Cc: Haiyang Zhang Cc: "Michael Kelley (EOSG)" Cc: Roman Kagan Cc: Andy Lutomirski Cc: devel@linuxdriverproject.org Cc: Paolo Bonzini Cc: "K. Y. Srinivasan" Cc: Cathy Avery Cc: Mohammed Gamal Link: https://lkml.kernel.org/r/20180124132337.30138-6-vkuznets@redhat.com --- arch/x86/hyperv/hv_init.c | 2 ++ arch/x86/include/asm/hardirq.h | 3 +++ arch/x86/kernel/irq.c | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c index e4377e2..a3adece 100644 --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c @@ -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(); diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h index 51cc979..7c341a7 100644 --- a/arch/x86/include/asm/hardirq.h +++ b/arch/x86/include/asm/hardirq.h @@ -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); diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 68e1867..45fb4d2 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -142,6 +142,15 @@ int arch_show_interrupts(struct seq_file *p, int prec) 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) seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count));