From patchwork Wed Nov 2 18:33:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 14444 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp72585wru; Wed, 2 Nov 2022 11:37:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Za1RoiKN8o4ni7Rm6ykxbFShvzMNgPSovflTb1zCtjKkPAMDGzBamWK4HX8kK0ljrPED9 X-Received: by 2002:a17:906:371a:b0:7ad:c01c:6fa0 with SMTP id d26-20020a170906371a00b007adc01c6fa0mr20580586ejc.267.1667414235647; Wed, 02 Nov 2022 11:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667414235; cv=none; d=google.com; s=arc-20160816; b=HIxym9ipnGMHFbyO0vMlZjLOfmUmB839XuP/AioUrWpn5nUyKRfCfekHhtfM7FzgdA 8kJDJARWk/2RhVtvbFggwF5IsUxMdFXw//PpTmGkG/QeR43zfOqyZ67HHv/7/LbK10mb vwqahNS7XTuGoRDFs9Tt/It4Wxdodf6mi+G0SpwDO8NsCY/eEJZfFdCC3X6po3H5FVw6 tRdN6B3FRrNB7vENkYvAXdkA7hAdSEpUibfKw0f0ZGVh3yBhnXeNNi3Rd+KRhoyuntZD zLm+/DFclTAhxTwvgKxwKQG9eOBjAo1fHr7dhDfYdqk3UmH+wIfuT4dDEyrPeLZs54K6 BrxA== 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=QqLWPThYSO+7/uH6VGCIiG2p0FrpcxY/esl5LuglSyI=; b=OL8OtDtBJESiZcr7ges9HeZURRKKWhhoO+xsMtUgLRmScKDX54Nj2RmURl/4IpOpzc 0aoZy3Fgce+R06mc9wu+8VNN0lzcs3BXZLRPUneLntzpxUK8Z1/F2Vt4Lc4U6IeYRhDq Dy5ShtUntSHskiWTnmH4F5mZx2mirY2pNRH5tZWE5wOwCyVjDuGLg39AhDhPuG7lYyVk 84buxrE3gRM8gZuJin0YfuRL5zzr0ZtM21f0zj1pApzBIbX2hezZZacUkYICrXqZuuaL LEQb8pKCrcJvVe6P9GmRkEhrMPtR/ZZx0sFxAuFTGQalgAzSb5/PIex2nkKdVHG77x+I DEfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cX2q7M1B; 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 p1-20020a170906a00100b007a71a3cb3afsi14134759ejy.294.2022.11.02.11.36.52; Wed, 02 Nov 2022 11:37:15 -0700 (PDT) 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=cX2q7M1B; 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 S231294AbiKBSga (ORCPT + 99 others); Wed, 2 Nov 2022 14:36:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231237AbiKBSgH (ORCPT ); Wed, 2 Nov 2022 14:36:07 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CD002FC02 for ; Wed, 2 Nov 2022 11:34:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667414062; 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=QqLWPThYSO+7/uH6VGCIiG2p0FrpcxY/esl5LuglSyI=; b=cX2q7M1B62WAcynjdoMvZPirXrSwaGXmmSUjrC5ArJpQTlQOhUcJOUFOWsDckocdlkocBW S1L1qFe1IsRjZBohnAy52IY5vfJopMPjOAtEQ+SEP07ZiaAEX0piQnXG3NzemZGigRolkk 8sSZrTKkqjcSN4/c+Tp8ItFn6kCYGnI= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-302-p7rA3EaKMuKzUquCDAA4BA-1; Wed, 02 Nov 2022 14:34:20 -0400 X-MC-Unique: p7rA3EaKMuKzUquCDAA4BA-1 Received: by mail-qk1-f199.google.com with SMTP id u7-20020a05620a0c4700b006ee526183fcso15796880qki.8 for ; Wed, 02 Nov 2022 11:34:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QqLWPThYSO+7/uH6VGCIiG2p0FrpcxY/esl5LuglSyI=; b=gd5IharHLZlT5roYMMNDDyYepSoP3w8QuVRnRai1iWqtnQ0ZoO9OABAYuz+5TWb1Gk p1SomFFzj34332VsOozl3vPFh3DbUkUOqtxdxy1LzbwXNBaI9SsSniByriHwSDy0IUdv 0xke+aLCToULNURI948Bo3naXpfySyrEkLXA0I28Md6Ac9JEmGcso/Cur619atYlp/EO ALlzn09wQHiyND7peqL2hSBQ4Xrt3SwnvEYrss0zruCaXtaYWaHWb+Bo+M2gAqHA0a5G O9Un/XjvlHKGn9mAB1reP0YvKh04PkvS+nhm6qX1GZoIKdE53zA7MG5nFd7208MbKgj0 6p0w== X-Gm-Message-State: ACrzQf1hHrvja9RCMF6HTxlWmIgBmt16NIkYXrhUikeT2xbZif6v8hXf RPfmvM01dZcGiIuBRVXUsE2xYqhW8K1wAPIHY/D+KrpeX2UY645s6LWdocslz169O8H4I1Q2Ngr oaqOXM8pxlUm185Ujdq2zPAgM X-Received: by 2002:a05:620a:2185:b0:6fa:9b5:7bcd with SMTP id g5-20020a05620a218500b006fa09b57bcdmr17834817qka.689.1667414059897; Wed, 02 Nov 2022 11:34:19 -0700 (PDT) X-Received: by 2002:a05:620a:2185:b0:6fa:9b5:7bcd with SMTP id g5-20020a05620a218500b006fa09b57bcdmr17834779qka.689.1667414059700; Wed, 02 Nov 2022 11:34:19 -0700 (PDT) Received: from vschneid.remote.csb ([149.71.65.94]) by smtp.gmail.com with ESMTPSA id w187-20020a3794c4000000b006eed47a1a1esm8757820qkd.134.2022.11.02.11.34.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 11:34:18 -0700 (PDT) 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: "Paul E. McKenney" , Steven Rostedt , 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: [RFC PATCH v2 4/8] smp: Trace IPIs sent via arch_send_call_function_ipi_mask() Date: Wed, 2 Nov 2022 18:33:32 +0000 Message-Id: <20221102183336.3120536-3-vschneid@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221102182949.3119584-1-vschneid@redhat.com> References: <20221102182949.3119584-1-vschneid@redhat.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3.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?1748410549351744601?= X-GMAIL-MSGID: =?utf-8?q?1748410549351744601?= 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 --- kernel/smp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/smp.c b/kernel/smp.c index e2ca1e2f31274..c4d561cf50d45 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 inline void +send_call_function_ipi_mask(const struct cpumask *mask) +{ + trace_ipi_send_cpumask(mask, _RET_IP_, func); + 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); }