Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1090183imm; Fri, 22 Jun 2018 10:08:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKJE8FloEsUATaUkDx9Y62aBKX27KxpysEJ48T0Xwqgk/CfBpXi8G/DYH3rQsHt89EGL0Gg X-Received: by 2002:a17:902:6686:: with SMTP id e6-v6mr2540183plk.35.1529687309873; Fri, 22 Jun 2018 10:08:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529687309; cv=none; d=google.com; s=arc-20160816; b=UDmnn21TizirFc7Kan/Z9pYN2XEkjFb4Jt3SxLsVjCpvs3ZpfoL9Ik4DsGx1WaTCQV sc67THza5BvBr264MQhpFq59B/+9Mcp/aL9/957wZ10c4wnNBWPIHAxF72HdUifU6DzL p6gGxeUt3spM0nPw2t57huvycFU7+N7ISys0hNJUHoRC8ns79tAE5u6r9KpCtC2Z/SBS G9wN4aNGkuKgipMSXON3aYDRR/SKqd9ll27iHwPpPUWWSq9heuY/aMQQwabsLH55Ceca XjMimdW/K5IiFMP5DNf0a/Zwlwfspi5uOmuKWLepozZ/fKbN2aW6Zu1194QekCu2MXpq tVcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=5lZZjj2la4yMeYeK7RbDmF1B1yw3ssPG4xZvrTOVwCM=; b=z/HuSryQVKJXPpLwmT01kt1QcPHqdYm2hkPSN15yYqcEKnMyu+il93iY5rpJfWd8bv 4RD6GgVS3kuSzwpnz5jsnvZxw7rQcQ7jUwZ++Sqof9a1y9YWeqq4NrroR8oTQQmVp0b0 +wO2MYS0z2wqjWPlreL3bq+np7UBNAVQ5Gq7QR9HsCioUTih+uS8VFC0EXJw+EUEKibi fdcB1xNQf5M6Vdv6RUvptdwN8SV4V5vb0qp6JuU/7wWDqrSx9fTQOazzroo/z4SrB+pn g77Uu9Bmse6InjR7YmU5xocgfN5LH8qE6q9sioTtzN0bZ0m1S8MuhMDfzqUfIy80fEDx 4BPw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d31-v6si4599551pla.190.2018.06.22.10.08.06; Fri, 22 Jun 2018 10:08:29 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933599AbeFVRHE (ORCPT + 99 others); Fri, 22 Jun 2018 13:07:04 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35454 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754542AbeFVRGg (ORCPT ); Fri, 22 Jun 2018 13:06:36 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5505540704AF; Fri, 22 Jun 2018 17:06:36 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98E781C59F; Fri, 22 Jun 2018 17:06:34 +0000 (UTC) From: Vitaly Kuznetsov To: x86@kernel.org Cc: devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Tianyu Lan , "Michael Kelley (EOSG)" Subject: [PATCH 4/4] x86/hyper-v: trace PV IPI send Date: Fri, 22 Jun 2018 19:06:25 +0200 Message-Id: <20180622170625.30688-5-vkuznets@redhat.com> In-Reply-To: <20180622170625.30688-1-vkuznets@redhat.com> References: <20180622170625.30688-1-vkuznets@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 22 Jun 2018 17:06:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 22 Jun 2018 17:06:36 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'vkuznets@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Trace Hyper-V PV IPIs the same way we do PV TLB flush. Signed-off-by: Vitaly Kuznetsov --- arch/x86/hyperv/hv_apic.c | 4 ++++ arch/x86/include/asm/trace/hyperv.h | 15 +++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c index ee962784d25b..657a2b8c738a 100644 --- a/arch/x86/hyperv/hv_apic.c +++ b/arch/x86/hyperv/hv_apic.c @@ -31,6 +31,8 @@ #include #include +#include + static struct apic orig_apic; static u64 hv_apic_icr_read(void) @@ -134,6 +136,8 @@ static bool __send_ipi_mask(const struct cpumask *mask, int vector) struct ipi_arg_non_ex ipi_arg; int ret = 1; + trace_hyperv_send_ipi_mask(mask, vector); + if (cpumask_empty(mask)) return true; diff --git a/arch/x86/include/asm/trace/hyperv.h b/arch/x86/include/asm/trace/hyperv.h index 4253bca99989..9c0d4b588e3f 100644 --- a/arch/x86/include/asm/trace/hyperv.h +++ b/arch/x86/include/asm/trace/hyperv.h @@ -28,6 +28,21 @@ TRACE_EVENT(hyperv_mmu_flush_tlb_others, __entry->addr, __entry->end) ); +TRACE_EVENT(hyperv_send_ipi_mask, + TP_PROTO(const struct cpumask *cpus, + int vector), + TP_ARGS(cpus, vector), + TP_STRUCT__entry( + __field(unsigned int, ncpus) + __field(int, vector) + ), + TP_fast_assign(__entry->ncpus = cpumask_weight(cpus); + __entry->vector = vector; + ), + TP_printk("ncpus %d vector %x", + __entry->ncpus, __entry->vector) + ); + #endif /* CONFIG_HYPERV */ #undef TRACE_INCLUDE_PATH -- 2.14.4