From patchwork Fri Jan 13 12:31:14 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: 43267 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp244668wrt; Fri, 13 Jan 2023 04:38:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXsBocY30VrV1wAlpO+HyEsMD5mzKlpImoeRinirMMTvvTZIo/liEgqs1zq/ehXPiZ9JtB1c X-Received: by 2002:a50:d482:0:b0:495:7152:af55 with SMTP id s2-20020a50d482000000b004957152af55mr23998185edi.32.1673613524078; Fri, 13 Jan 2023 04:38:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673613524; cv=none; d=google.com; s=arc-20160816; b=dZ0tvbFtz4pGxMQ90BzyGciWsD6PxEronNfuILbcah3LytrY+QjVFF9ShzzHxM9VoR BASkpswbwnqu+RkNGKFt1/iTf/aHnLE3oS9utoAkaQq27j8hYYhhMCWBGJlgb7jaq5VE TCccQoBUsZjsTOnn8/agOlwmK9ItRbTib/9ueIF+9ycmK1yIUKjczp/xdWn6Nf2FJQ9c GJdlxTNs/VjeR1WeTtij06IMX6bknJu60tMd/gz6u7xa3LjwZwVSYVgZNXuELNswNPsQ plm93ROU18GkXEBr8qJR4c1XiMHLWv1aLrOv3+k8wkppPNHo4yxvBZROr5g2T1ZYkRAU iYow== 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=j+TVfMwfHVlAILX6qw79Q56xQlz1sbUg6aLQmBNyfUs=; b=o7taBbGhRenCIeJQSM/9/Gs7dWQaUg4MOMi6cyk1Nfkk6Srdm2pNAM95ctDr3dy4no ju3GV6EaZzYsDYPOGzNkMcaADD2sbs7Q8cV6KF9qKxkcWcDOlvsPDZnnYe34EL2wP3Bf G9PCilf70O8OcgMSkbgC8xLCpKKgGMFqoY+PpgLfZIulSltU+BArYPZ/Zc69h9MF5Ykh cLoSwV0eIk50Mcbu0iaQDiyTm3AwuwPpWg7Zb1zqMqDLveriHG9ctlXm04H57/NVmyHW Nia9LYyqAwEV/1ozU3dOgW7Z/23xthDu5zvdSjiQ56KZDYyV+ESLFRzeuaqfZdnQ4K5k i3tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fJInBvJW; dkim=neutral (no key) header.i=@linutronix.de; 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 o14-20020aa7dd4e000000b0048ea26ce021si18738038edw.68.2023.01.13.04.38.18; Fri, 13 Jan 2023 04:38:44 -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=fJInBvJW; dkim=neutral (no key) header.i=@linutronix.de; 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 S241355AbjAMMhc (ORCPT + 99 others); Fri, 13 Jan 2023 07:37:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233011AbjAMMcT (ORCPT ); Fri, 13 Jan 2023 07:32:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C54356882; Fri, 13 Jan 2023 04:31:16 -0800 (PST) Date: Fri, 13 Jan 2023 12:31:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673613074; 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=j+TVfMwfHVlAILX6qw79Q56xQlz1sbUg6aLQmBNyfUs=; b=fJInBvJWKY6x/C8dg4y6AP426fw4KvA3HiFsXxIjvto1KHNTID6MZwy1ZcttaN0iVa+u0/ g9H7R+hv/VHg3DZDTNMJQgvKorvkDpBgpZKSlrnAm9rYlZZCzaM6mb5mTUGkfKEe63exja DXQgJx4v9VBi4wmO+UC+QLacc5buGXozvcoTZAX2x4AIRsFbLcyE9tDdCST0bibp2H+7O2 AqRk1k8vLDRF3YjNYNw5kERCbjOfB5KbBooiPjjEtZOj8Ine/HJhNPRFMJp8byqP+SnxpL ZWUHUbvLNP0REEgA4FYKO/o/6Py02LPSPIuPPqM9lmbhFkqtf6RBHhxI7IIlhw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673613074; 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=j+TVfMwfHVlAILX6qw79Q56xQlz1sbUg6aLQmBNyfUs=; b=Rhl7wM8ip2d2L4PZKSJSb/7UoPcC24zb5xaPmkpXv/UYwd3+daSTq1+/AMhbnXUfCiCJpU m8IidW4gtMiHSdCA== 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, OMAP3: Push RCU-idle into driver Cc: "Peter Zijlstra (Intel)" , Ingo Molnar , Tony Lindgren , Ulf Hansson , Frederic Weisbecker , "Rafael J. Wysocki" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230112195539.883561913@infradead.org> References: <20230112195539.883561913@infradead.org> MIME-Version: 1.0 Message-ID: <167361307447.4906.15636884129061462694.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?1754910974537450080?= X-GMAIL-MSGID: =?utf-8?q?1754910974537450080?= The following commit has been merged into the sched/core branch of tip: Commit-ID: 4d1be9e745382b41492b0cb9000829863db7133a Gitweb: https://git.kernel.org/tip/4d1be9e745382b41492b0cb9000829863db7133a Author: Peter Zijlstra AuthorDate: Thu, 12 Jan 2023 20:43:23 +01:00 Committer: Ingo Molnar CommitterDate: Fri, 13 Jan 2023 11:47:19 +01:00 cpuidle, OMAP3: Push RCU-idle into driver Doing RCU-idle outside the driver, only to then teporarily enable it again before going idle is suboptimal. Notably the cpu_pm_*() calls implicitly re-enable RCU for a bit. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Tony Lindgren Tested-by: Ulf Hansson Reviewed-by: Frederic Weisbecker Reviewed-by: Tony Lindgren Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230112195539.883561913@infradead.org --- arch/arm/mach-omap2/cpuidle34xx.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index 090a8aa..cedf5cb 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -133,7 +133,9 @@ static int omap3_enter_idle(struct cpuidle_device *dev, } /* Execute ARM wfi */ + ct_idle_enter(); omap_sram_idle(); + ct_idle_exit(); /* * Call idle CPU PM enter notifier chain to restore @@ -265,6 +267,7 @@ static struct cpuidle_driver omap3_idle_driver = { .owner = THIS_MODULE, .states = { { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 2 + 2, .target_residency = 5, @@ -272,6 +275,7 @@ static struct cpuidle_driver omap3_idle_driver = { .desc = "MPU ON + CORE ON", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 10 + 10, .target_residency = 30, @@ -279,6 +283,7 @@ static struct cpuidle_driver omap3_idle_driver = { .desc = "MPU ON + CORE ON", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 50 + 50, .target_residency = 300, @@ -286,6 +291,7 @@ static struct cpuidle_driver omap3_idle_driver = { .desc = "MPU RET + CORE ON", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 1500 + 1800, .target_residency = 4000, @@ -293,6 +299,7 @@ static struct cpuidle_driver omap3_idle_driver = { .desc = "MPU OFF + CORE ON", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 2500 + 7500, .target_residency = 12000, @@ -300,6 +307,7 @@ static struct cpuidle_driver omap3_idle_driver = { .desc = "MPU RET + CORE RET", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 3000 + 8500, .target_residency = 15000, @@ -307,6 +315,7 @@ static struct cpuidle_driver omap3_idle_driver = { .desc = "MPU OFF + CORE RET", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 10000 + 30000, .target_residency = 30000, @@ -328,6 +337,7 @@ static struct cpuidle_driver omap3430_idle_driver = { .owner = THIS_MODULE, .states = { { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 110 + 162, .target_residency = 5, @@ -335,6 +345,7 @@ static struct cpuidle_driver omap3430_idle_driver = { .desc = "MPU ON + CORE ON", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 106 + 180, .target_residency = 309, @@ -342,6 +353,7 @@ static struct cpuidle_driver omap3430_idle_driver = { .desc = "MPU ON + CORE ON", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 107 + 410, .target_residency = 46057, @@ -349,6 +361,7 @@ static struct cpuidle_driver omap3430_idle_driver = { .desc = "MPU RET + CORE ON", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 121 + 3374, .target_residency = 46057, @@ -356,6 +369,7 @@ static struct cpuidle_driver omap3430_idle_driver = { .desc = "MPU OFF + CORE ON", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 855 + 1146, .target_residency = 46057, @@ -363,6 +377,7 @@ static struct cpuidle_driver omap3430_idle_driver = { .desc = "MPU RET + CORE RET", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 7580 + 4134, .target_residency = 484329, @@ -370,6 +385,7 @@ static struct cpuidle_driver omap3430_idle_driver = { .desc = "MPU OFF + CORE RET", }, { + .flags = CPUIDLE_FLAG_RCU_IDLE, .enter = omap3_enter_idle_bm, .exit_latency = 7505 + 15274, .target_residency = 484329,