Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2325285rwb; Fri, 2 Dec 2022 08:18:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf7kGbRDGFhc2cvh5eFgGKKvGWOltI7D+ctp50im8UF6eAF42On5J6D3RtDM1YCzIYQmTAAH X-Received: by 2002:a17:906:f752:b0:7b9:b2f1:f382 with SMTP id jp18-20020a170906f75200b007b9b2f1f382mr40853510ejb.187.1669997882473; Fri, 02 Dec 2022 08:18:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669997882; cv=none; d=google.com; s=arc-20160816; b=ohxu3CPt6aQTwGQWy2rQ/Ykj79MmlTZ1sO65fu1SAoEB8OCR2EyBDBWkeJpjmRn+tU IDaSktmRiPOBCUSGbq5HBNwMzdPGwnoWi7Gy0UhOk2LL1W8HED6ezNS0+ojNjIGrNmek UqV7k/C9dYphGyAEZasbE5GnE4pkzKQcsDXDbx+ICGxkOsporQ2lDaOyBFNQyaBCXadd HW/CmN6XgZmIkKS37QBFn6ibtKU02gai3DkYANuKYV3uIlHUdklwfw98y1SZg/xuE21E SXJaR6aLFk1OwZZ7LWQtdwjurhpM7tQo6ZBz8lhEEbuO/Giu6hJDGBF0Wn9C10v8IZ0N vnHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EP4LqydUSiQVulPj8M4fIZioGJfqcQn9EHXEOk9M9cI=; b=aglNigJOXWndYpitBSMKm6OHWrkDO6dumRWu76AWtEIdcAcXxsGUDGrRgb2YuWciP/ 9fc6oaYGHu1mXvg2Gbvge0czd51khcZZapUclE4OZL2R9r7brRG1NDmzaMjIoH73dDA9 zBA7CCIIKdo5BLUN1dyVsxyTDTucLvMRCjepAxV1bhbwr8ir03ok08YgWp4pP228KHK7 xiLjadF76uepEkpH8MzSZT75eLXOtth2bmGfCo25bCYwOABQNUkWIPQfnm6fw0ip7Lwd xYwP8/mMTrhtJ5l7A868b3fYiZIYmkRSq8fEcFaDx8ciyiKytrL9/wF3Wyyn71uT5nZM s4/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M1d1bNLB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p20-20020a056402045400b0045945eed10asi6059379edw.5.2022.12.02.08.17.38; Fri, 02 Dec 2022 08:18:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M1d1bNLB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233654AbiLBQA5 (ORCPT + 82 others); Fri, 2 Dec 2022 11:00:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233861AbiLBQAV (ORCPT ); Fri, 2 Dec 2022 11:00:21 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D20359A4F0 for ; Fri, 2 Dec 2022 07:59:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669996757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EP4LqydUSiQVulPj8M4fIZioGJfqcQn9EHXEOk9M9cI=; b=M1d1bNLBzHanB/uSa16264CESg4qqHh+WirBs1whhtZhP+tQa1OUHVStI0+SDDvowvrY7O sCYTqLJZkC9am2pXS/WSoUAdJ1lBwE39O7lD79pFesF3qZv/io5IKDMcyLWRMn3TKVjLPe 64GYVSKd5aq94vgWGse3XR/t4LXcZdo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-Bg0y_EcoMPeHLIEf6idOGw-1; Fri, 02 Dec 2022 10:59:13 -0500 X-MC-Unique: Bg0y_EcoMPeHLIEf6idOGw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BB89085A5A6; Fri, 2 Dec 2022 15:59:11 +0000 (UTC) Received: from vschneid.remote.csb (unknown [10.33.36.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4E3F202903F; Fri, 2 Dec 2022 15:59:07 +0000 (UTC) From: Valentin Schneider To: linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-ia64@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, x86@kernel.org Cc: Steven Rostedt , "Paul E. McKenney" , Peter Zijlstra , Thomas Gleixner , Sebastian Andrzej Siewior , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Frederic Weisbecker , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Marc Zyngier , Mark Rutland , Russell King , Nicholas Piggin , Guo Ren , "David S. Miller" Subject: [PATCH v3 4/8] smp: Trace IPIs sent via arch_send_call_function_ipi_mask() Date: Fri, 2 Dec 2022 15:58:13 +0000 Message-Id: <20221202155817.2102944-5-vschneid@redhat.com> In-Reply-To: <20221202155817.2102944-1-vschneid@redhat.com> References: <20221202155817.2102944-1-vschneid@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This simply wraps around the arch function and prepends it with a tracepoint, similar to send_call_function_single_ipi(). Signed-off-by: Valentin Schneider Reviewed-by: Steven Rostedt (Google) --- kernel/smp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/smp.c b/kernel/smp.c index e2ca1e2f31274..93b4386cd3096 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -160,6 +160,13 @@ void __init call_function_init(void) smpcfd_prepare_cpu(smp_processor_id()); } +static __always_inline void +send_call_function_ipi_mask(const struct cpumask *mask) +{ + trace_ipi_send_cpumask(mask, _RET_IP_, NULL); + arch_send_call_function_ipi_mask(mask); +} + #ifdef CONFIG_CSD_LOCK_WAIT_DEBUG static DEFINE_STATIC_KEY_FALSE(csdlock_debug_enabled); @@ -970,7 +977,7 @@ static void smp_call_function_many_cond(const struct cpumask *mask, if (nr_cpus == 1) send_call_function_single_ipi(last_cpu); else if (likely(nr_cpus > 1)) - arch_send_call_function_ipi_mask(cfd->cpumask_ipi); + send_call_function_ipi_mask(cfd->cpumask_ipi); cfd_seq_store(this_cpu_ptr(&cfd_seq_local)->pinged, this_cpu, CFD_SEQ_NOCPU, CFD_SEQ_PINGED); } -- 2.31.1