From patchwork Tue Jan 31 14:22:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 50891 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2780062wrn; Tue, 31 Jan 2023 06:27:35 -0800 (PST) X-Google-Smtp-Source: AK7set+BvBDZ9zHvvofhpjzSfguvJPT537mwTawwOIEHFnpZbJvwZy5stTxyePMVXqZs446Vw6d9 X-Received: by 2002:a05:6402:943:b0:4a2:2e8a:14c5 with SMTP id h3-20020a056402094300b004a22e8a14c5mr12086858edz.2.1675175255534; Tue, 31 Jan 2023 06:27:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675175255; cv=none; d=google.com; s=arc-20160816; b=GR7IbY1hMxiph0GSxNCwX9LThp/CR0trkbmLf5fHStULvXzyWrBoakyFcGN0cXOfRf eY+Bap3BLclaMZCBkKYXwba6NlT07hFoEuTZmVBAMSayLYlTlHfd5MZjpMakFPTQGkp9 HQ1pes2oG5bGvI88iOPHq5WF7TukfZcwRjBugppEmrSZZt8QTHUwi2dNL/LfCPejYGA1 0sADaGKfBhLmN6ZG8Shche9zAF/LFpr7vOYHL5BCecUdGgRqMGZh91WOt9KD77DsBDAL EbN7zDEwXfkYPk9J0jM1dEFklWHwJlaPsqYB15gXQRQmo/H56RPTGJR8Oi7o7t4GwJP9 Ncxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=4lUA3VPonoVUn9hM8v0u4FdHhUH8cnco09NvCP743iA=; b=ALWPWQTOhwQDTb2RRoMI/Cbr0i+ThHF8mwOn5SXkACxHfQfii5x4QVEMbJmSl1Q9U+ o09Dp3T0Xp0yO4V0zAqZ7grIpiXlhOhLdbkZOFrvZl2PATqt10zHnUlI2j2djwVpj2T0 6iATN1ZiceWjxswTBrP0qAvQyc3lBsUFu7vFLqe8SNInsGaEF4+rfC3jFdOsj3UvmToQ fG2oXmOSJbuu8CA+VAde4fDS+7XZsbD0lEfQKgEN0GPjJz8b8S58WXM97u8AwmgMj6De huR4HyXQCPqgKqAyJtnZe4RUTzyHQV+5AapmtBWua9Q0JcAXlqublTfdVvn6tYMMYJV6 WOJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wcUTV3ra; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fr33-20020a170906892100b0088429fefa58si1905831ejc.31.2023.01.31.06.27.11; Tue, 31 Jan 2023 06:27:35 -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=@linutronix.de header.s=2020 header.b=wcUTV3ra; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229828AbjAaOW5 (ORCPT + 99 others); Tue, 31 Jan 2023 09:22:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231795AbjAaOWb (ORCPT ); Tue, 31 Jan 2023 09:22:31 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8EE51D921; Tue, 31 Jan 2023 06:22:30 -0800 (PST) Date: Tue, 31 Jan 2023 14:22:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1675174948; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4lUA3VPonoVUn9hM8v0u4FdHhUH8cnco09NvCP743iA=; b=wcUTV3ram6kUDK/x+b5vsHu+h144O6chFf2dP4gbNbHd+0b1F297Vhd20IeW9ikTNnSSBz aH0La4KLp7MZL0li4Vn/0FHcRr3YC9dW2Wo4R4M/Rk+ETcH31OB4TGNtwbgjDfrAZ4VeCg 4DUDRRL3Bq7hmfeAH/QAdWvzsg5MEZJrguYLBBqPBeHkOgZcRuIFDh2/Gm6tOf3Fzyl0rw 60TmX7FExqgmJz6/YB5wJXSkzpEc/YOUM/LuqcWHZseclfArqTjo9C2fBPzccasv7/I29q gUI3fwbHtPOmNcwJO9lf4OAoomiSCVdFWkoBSZiaD+ir9YlWYPbq5rKbU/OJHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1675174948; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4lUA3VPonoVUn9hM8v0u4FdHhUH8cnco09NvCP743iA=; b=lhzgc9Efj4EoBzwzRqr3H+Gw639meGVBeuito+2jqcNGdVkXHMYEEf3hZThELHDn8mgxm1 mKOr5n9nFNIByEAw== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] cpuidle: tracing, preempt: Squash _rcuidle tracing Cc: Mark Rutland , "Peter Zijlstra (Intel)" , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <167517494797.4906.221283019576785250.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham 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?1756548568451885194?= X-GMAIL-MSGID: =?utf-8?q?1756548568451885194?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 3017ba4b831bc7fd67cc82e744116b6e45e259a4 Gitweb: https://git.kernel.org/tip/3017ba4b831bc7fd67cc82e744116b6e45e259a4 Author: Peter Zijlstra AuthorDate: Tue, 31 Jan 2023 09:50:36 +01:00 Committer: Ingo Molnar CommitterDate: Tue, 31 Jan 2023 15:01:46 +01:00 cpuidle: tracing, preempt: Squash _rcuidle tracing Extend/fix commit: 9aedeaed6fc6 ("tracing, hardirq: No moar _rcuidle() tracing") ... to also cover trace_preempt_{on,off}() which were mysteriously untouched. Fixes: 9aedeaed6fc6 ("tracing, hardirq: No moar _rcuidle() tracing") Reported-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Mark Rutland Link: https://lkml.kernel.org/r/Y9D5AfnOukWNOZ5q@hirez.programming.kicks-ass.net Link: https://lore.kernel.org/r/Y9jWXKgkxY5EZVwW@hirez.programming.kicks-ass.net --- kernel/trace/trace_preemptirq.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c index f992444..e37446f 100644 --- a/kernel/trace/trace_preemptirq.c +++ b/kernel/trace/trace_preemptirq.c @@ -15,10 +15,6 @@ #define CREATE_TRACE_POINTS #include -#ifdef CONFIG_TRACE_IRQFLAGS -/* Per-cpu variable to prevent redundant calls when IRQs already off */ -static DEFINE_PER_CPU(int, tracing_irq_cpu); - /* * Use regular trace points on architectures that implement noinstr * tooling: these calls will only happen with RCU enabled, which can @@ -33,6 +29,10 @@ static DEFINE_PER_CPU(int, tracing_irq_cpu); #define trace(point) if (!in_nmi()) trace_##point##_rcuidle #endif +#ifdef CONFIG_TRACE_IRQFLAGS +/* Per-cpu variable to prevent redundant calls when IRQs already off */ +static DEFINE_PER_CPU(int, tracing_irq_cpu); + /* * Like trace_hardirqs_on() but without the lockdep invocation. This is * used in the low level entry code where the ordering vs. RCU is important @@ -100,15 +100,13 @@ NOKPROBE_SYMBOL(trace_hardirqs_off); void trace_preempt_on(unsigned long a0, unsigned long a1) { - if (!in_nmi()) - trace_preempt_enable_rcuidle(a0, a1); + trace(preempt_enable)(a0, a1); tracer_preempt_on(a0, a1); } void trace_preempt_off(unsigned long a0, unsigned long a1) { - if (!in_nmi()) - trace_preempt_disable_rcuidle(a0, a1); + trace(preempt_disable)(a0, a1); tracer_preempt_off(a0, a1); } #endif