From patchwork Fri Dec 2 15:58:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 28951 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp937750wrr; Fri, 2 Dec 2022 08:01:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf5r3N22OyeQv87dIlbtjrVBlerHM32WlDU8bDcU6KUuychhJsb5SsJF72xBgWpv7zRd6/Pk X-Received: by 2002:a17:902:e849:b0:186:ee56:4a1e with SMTP id t9-20020a170902e84900b00186ee564a1emr56728976plg.167.1669996894711; Fri, 02 Dec 2022 08:01:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669996894; cv=none; d=google.com; s=arc-20160816; b=TBbnIV2IpXCmMltayc4vmqsVL3giZ+KkTA81Bm6zPm1jbMuPQWWwt4ZainZuwR1a3B zXZNjnJqR+QPrWgP7KTMdc5FVDS4ryIZ9uBIH2NwvZgK/wT3BsfiSlk2usqnPsNcg0Cc 9BjYq7NRPlhm1Sv2Mzm5oZMV8XK3Ld+sN1Temk7rBiuD5fxOj7TNyNHwkX2Zjla7/3gj +BYaIVLQp6p6AGSt5a8R5uPNksGRgugWMimNSsv5u1Zq3jl+1wwc1ZItZZDFVRh0NZdu bOhiejWApfMdcV4L4cmuaHRQL5tcx0ElMLv8zywrqian0FdfY+RwCDngZb5l+8VvxtGG DurA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 71-20020a63014a000000b0047853fba938si7697309pgb.390.2022.12.02.08.01.20; Fri, 02 Dec 2022 08:01:34 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751118663434618047?= X-GMAIL-MSGID: =?utf-8?q?1751118663434618047?= 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); }