From patchwork Fri Jan 13 12:31:13 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: 43255 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp244059wrt; Fri, 13 Jan 2023 04:37:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXvSsobZW7aSJhQUve4F/BrNp0N9upQwSP5qXvB04bqAsuLwmcL9hx90mioR4V865KWJIXmw X-Received: by 2002:a17:906:b108:b0:843:a9fe:f115 with SMTP id u8-20020a170906b10800b00843a9fef115mr71988736ejy.32.1673613441696; Fri, 13 Jan 2023 04:37:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673613441; cv=none; d=google.com; s=arc-20160816; b=h+Xi+HczBjciMbqUiJPh4goxkMaeKP16S+UymIb/0OKty0S5i24PG3mZOF40IAtx+n tzlHWl7bS1L9DihpL0WzRRrOOfcxd7IhqSa/ADphajIxo4zYDs5ZgJ6CfagI1TgXS8pm PiNvADfd1K3+g3lsTGzuOtrWZMsOdZjvotuXFqxy9m6BRpGeklRgEh3kghsIS6GJ1WZb 3Y72XUiMX+cPbFl7GQBhmr5OxJ2z9oSHDFf2PCdkCJTMc22aJ//dP3GJXIx5bz4FhzQg V+aGV1Qqzh9SHPA3fcThIxW76jbxQQIIgnYl3D2tn8ok0EoKSJP2R1QcN7u5DrY638Cz 7oZg== 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=hP/k/NMqAdiQz8WBcJ0kwxY2utEsP452HHTIG3MkVw4=; b=tS3pyUxo/Nl46gcx1XVBqgYQcp2f7AnL8/5qd+Cot3g79hFiru6IEqN6yOvJQ0fVQh wafBVgDG6IWkIALTQcbrf7fHHLth7KTpN6tuSgDi1tfcu2xAl/n1lZJLw2bpr6d98sp7 VCheFC6s9ZBYZOCKICrrHA4BmFBdpFL4t1yfnIvsinGeX3JqbUn6wSWCBObROs18a03I n1HcgwPO5aJSBdAbhPIHgiks3tyxARV2eocq5PHS/m1Aqe4zyBnmGZnd/XKAUpNlSA12 mrFoLzTwT14SbX5H7JyQTIQVbQ0wRrkHEjd5wxUXnlQqc7//rfTN802nJGbuoUWqqa5m +c1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=rgxJ6a3m; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=e49LbSOx; 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 wg10-20020a17090705ca00b007c18ffbf16esi10844515ejb.433.2023.01.13.04.36.56; Fri, 13 Jan 2023 04:37:21 -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=rgxJ6a3m; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=e49LbSOx; 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 S241588AbjAMMf6 (ORCPT + 99 others); Fri, 13 Jan 2023 07:35:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241215AbjAMMcS (ORCPT ); Fri, 13 Jan 2023 07:32:18 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20CFA559F9; Fri, 13 Jan 2023 04:31:15 -0800 (PST) Date: Fri, 13 Jan 2023 12:31:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673613073; 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=hP/k/NMqAdiQz8WBcJ0kwxY2utEsP452HHTIG3MkVw4=; b=rgxJ6a3mxj4FyrboxhMfMvxXHX0zTZo3Jkm8UZpHEf95ltmxldde/jrItjxO2JCzrrkCTk rJ7buqtf/Y14sU2iXJ0c/VXR3amR45qikey2Xhx/SHMzJENiZpEo+J6TuI1J4QuIBdnbD2 v8ymCikbEFLbHq8FKXcGGoRg6xy2FX2brq78psZFWFKjd82r7Y8iMmzBsML3dH1ov1XTmj hZ4NxchbIZ3sPb14u4noPYmVlk1SU1so6JWpzLf4gPB/fJNFgc5mY3PbNNE8AYIzIJdMJy 2By7myYiy9hU6SsHfVVU9wnpl9O2g2gMvnZRa6S4+XxGWBw05vNoC+rA8dsr9w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673613073; 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=hP/k/NMqAdiQz8WBcJ0kwxY2utEsP452HHTIG3MkVw4=; b=e49LbSOx/HqASJeklYg/kBWJBlDFhf0b2hfeg8I8EU77XOpHKK/lm3QbLVjv9oQ0l7cH9X ACIH29giojARKTBQ== 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, cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}() Cc: "Peter Zijlstra (Intel)" , Ingo Molnar , Tony Lindgren , Ulf Hansson , Mark Rutland , "Rafael J. Wysocki" , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230112195540.190860672@infradead.org> References: <20230112195540.190860672@infradead.org> MIME-Version: 1.0 Message-ID: <167361307344.4906.3430175996894589521.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?1754848550273358697?= X-GMAIL-MSGID: =?utf-8?q?1754910888473907797?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 924aed1646bf2859726f7e5dd9265ba14358fbb8 Gitweb: https://git.kernel.org/tip/924aed1646bf2859726f7e5dd9265ba14358fbb8 Author: Peter Zijlstra AuthorDate: Thu, 12 Jan 2023 20:43:28 +01:00 Committer: Ingo Molnar CommitterDate: Fri, 13 Jan 2023 11:48:15 +01:00 cpuidle, cpu_pm: Remove RCU fiddling from cpu_pm_{enter,exit}() All callers should still have RCU enabled. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Ulf Hansson Acked-by: Mark Rutland Acked-by: Rafael J. Wysocki Acked-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230112195540.190860672@infradead.org --- kernel/cpu_pm.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/kernel/cpu_pm.c b/kernel/cpu_pm.c index ba4ba71..b0f0d15 100644 --- a/kernel/cpu_pm.c +++ b/kernel/cpu_pm.c @@ -30,16 +30,9 @@ static int cpu_pm_notify(enum cpu_pm_event event) { int ret; - /* - * This introduces a RCU read critical section, which could be - * disfunctional in cpu idle. Copy RCU_NONIDLE code to let RCU know - * this. - */ - ct_irq_enter_irqson(); rcu_read_lock(); ret = raw_notifier_call_chain(&cpu_pm_notifier.chain, event, NULL); rcu_read_unlock(); - ct_irq_exit_irqson(); return notifier_to_errno(ret); } @@ -49,11 +42,9 @@ static int cpu_pm_notify_robust(enum cpu_pm_event event_up, enum cpu_pm_event ev unsigned long flags; int ret; - ct_irq_enter_irqson(); raw_spin_lock_irqsave(&cpu_pm_notifier.lock, flags); ret = raw_notifier_call_chain_robust(&cpu_pm_notifier.chain, event_up, event_down, NULL); raw_spin_unlock_irqrestore(&cpu_pm_notifier.lock, flags); - ct_irq_exit_irqson(); return notifier_to_errno(ret); }