From patchwork Fri Aug 30 22:28:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13785704 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4CC3CCA101B for ; Fri, 30 Aug 2024 22:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rumBJ123mj0AOjrTxzTEs5lY7DqFY8qwAn61RRWrZgM=; b=W8Tnfzx7tu90LoSX1IC1tpQ3UB 78BUjTrpF/FlGCFyJ2aTyW4AkA4MEtSOCdoxvu6raqXasGrua/o2Uo0FFXBlC+iN7g6fr5ZvCAiDU FTbAk92qNsUjarik2AqBz6U8ZRFVMvAP8Dgxjj5Jp5lMAk6BV2y6sQVct0IYBQRWYppZAysfMP/MZ EJ6VCTsq/wkOtwX4FFZVc0RVNaEAUR1OTD5qNnkjTD4UaIqPU7GB3tlqmuXzMBx14PkET2RzmV/kW oEEEHdtZ87QyNAH15HQRiJmwCfhwz1dfwbsIpJ9FADXZTCt+R3uBPXy16VkuhB+Opv9eHCBIuEUv1 9w2Yvmjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1skAMY-00000007wRJ-3Y9h; Fri, 30 Aug 2024 22:45:02 +0000 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1skAEN-00000007uyt-1Zzn for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 22:36:37 +0000 Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47UMNAKL030649; Fri, 30 Aug 2024 22:36:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=rumBJ123mj0AOjrTxzTEs5lY7DqFY8qwAn61RRWrZgM=; b= AJssfwVjjLDf25M+uT2wt0R1cHtVHq9ZVI6OAjv65jZ/we2IitS1uo7ap4z5x3Vs 6/19Ogi1cQzp3dVsugSQZyL3PSzfWiH6hRLlZ220htYSJLPMwWE4LBWqNbR9dLig xpK8Gjo3I6Oev9bUEF8SJfy9+HZCH5mQqTo6sXDigKgNtb3dIkQY4oZFjflv2pQm g46i1deINZeDcj6VC4k30j6Qyl4HJTg+ghKSD+YLEGvnPUtf7G2QpPITc/P7T097 LQs1j+eTdLGjeLeE+b029wH55PTAodKtBFSulaC2Wza4CeNftRY70DfzT908rSjI DPR9RSG24SymT5Qom1N42A== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 419pugyr9f-11 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 22:36:11 +0000 (GMT) Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 47UMDwMs016875; Fri, 30 Aug 2024 22:28:53 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2045.outbound.protection.outlook.com [104.47.70.45]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 418a5wya2f-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Aug 2024 22:28:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TOEOmoB1a16Xli0MveJFv6uy2Sm4sRPjco7NK4zytyBPA/rRDGb469bYdLZyZk0sigNX0rUQzi8hD/0CkVeSrUJnjYdU292ESV6LO0wT/kVZG8sSrsHRKNa/5te1fsAOTmv/FEdMn29xOP/qIEXxBr2cqe1yY+/Cwj621DbkfW4uzEkTQrlQOAp/jBsvEZnLSyzCtdeMpDiPKn/Vn6aXZSIYqUNly2m6fPMKnowLyJrBZBcz2IZFDlTeCE5FMVvfxar5lDCMCxGGeXzfnKf1NuTuRcJ8KdwS8XGOwW2tDGF32HqB6/IwdJe3cAMeOu1PJVIY2ESFXjtT7XDnhIxTRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rumBJ123mj0AOjrTxzTEs5lY7DqFY8qwAn61RRWrZgM=; b=W06ItfAeQvfnSzRmaV8Ctv095sKOk3ZlRMGrQVovAuq6uHOGHx26wsQKYUKKBez67rpRGr1z0VL5wdMo6C/pUVcKHM836jft05D55kgewHNgULRu5pOHiEwcyykf6g0ecCKq9WfA2XUJzfBGZV4G8183gzDlH195/omIAy4rJBKeMf24LBVkcIGbmd8ee5R4bzHJwsM8diDWyoq9X0RKlyDsIJYvrT2lnenJsCDuIyl8c3I1d2aHL1CpmUh7zhOIiK5AcEg3ZjMFU04meP+khuUGUERRatFAMMlTJ7OvzpLuIEmPikY1pZPtBHpzIn8+tgvAAm/K3gVj5IjlwvHRWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rumBJ123mj0AOjrTxzTEs5lY7DqFY8qwAn61RRWrZgM=; b=Ha8lQxB9FgdQid95/LhcCx2d77b7qRumAykiBATSHLcr0J0dVGh6BxmDmvA4kLHQ8wm7r86HwFigQ+IE2hvawgLXUBUI4DVWX+xMCr52jw3dqMudX9ZGNyHstmLBf/3Xr0ltkZ39nJ3nPwqzrKpNZ5aaYlpK97rkpofduME3CBg= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by BN0PR10MB5077.namprd10.prod.outlook.com (2603:10b6:408:12e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.20; Fri, 30 Aug 2024 22:28:51 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::25a9:32c2:a7b0:de9e]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::25a9:32c2:a7b0:de9e%3]) with mapi id 15.20.7918.020; Fri, 30 Aug 2024 22:28:51 +0000 From: Ankur Arora To: linux-pm@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, pbonzini@redhat.com, wanpengli@tencent.com, vkuznets@redhat.com, rafael@kernel.org, daniel.lezcano@linaro.org, peterz@infradead.org, arnd@arndb.de, lenb@kernel.org, mark.rutland@arm.com, harisokn@amazon.com, mtosatti@redhat.com, sudeep.holla@arm.com, cl@gentwo.org, misono.tomohiro@fujitsu.com, maobibo@loongson.cn, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com Subject: [PATCH v7 02/10] cpuidle: rename ARCH_HAS_CPU_RELAX to ARCH_HAS_OPTIMIZED_POLL Date: Fri, 30 Aug 2024 15:28:36 -0700 Message-Id: <20240830222844.1601170-3-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240830222844.1601170-1-ankur.a.arora@oracle.com> References: <20240830222844.1601170-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: BY5PR17CA0030.namprd17.prod.outlook.com (2603:10b6:a03:1b8::43) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|BN0PR10MB5077:EE_ X-MS-Office365-Filtering-Correlation-Id: a07cac0f-eeed-4e7c-7e58-08dcc9431fb5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|366016; X-Microsoft-Antispam-Message-Info: l1ivSVzqI6lf4e/jX5273I+gP2G6Af8n5zwD3LF2lj1aIkPHz3iU7Y0m9P3Qx6H2WTOBjMqNf6sGys9F4re4Q94L62dvTbRSHvsIHpFH5RzkiwthO9SN4qKmayZ+DsOkHZB5K9CIc2Y8Yst96iUeANk8JH/DJJoG+dq4MdneEhlF5vUONyenGXDpMzoonnSs1o9bkzo8ZEiV57V7GTMMqgTWiJVChQNdvXJNx/JxKg6sc0vmFPa2Vr/rwEY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oAy6pWE1LRqQ31qMO/7gTMHgmUlHky/MTh35Fxjus4vBbg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO6PR10MB5409.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(7416014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 8G3ilbNV0Ox7BbXJqbskLjsWqkL+6wqPxUFAMT0eNkf3onI1iKOl7gmfJ9ALwfXF4ppvqfp90KK8gBi5hXwWyzcqwxsD18MoqK+T4GRW2XplQ/+RHqdRe/NngpwBd1f98fwHYuEtn1G2GLFqdYzOm+Uz/yjPd0nRUPugvKQCZBSltP3L5UzPI4pRLLdNC5VGA2y0CBNR7FKmSWKlIbIg/cS6GCypm7waF8IVVDbjDR8sT3uMZiNMHjTDz64rDsUhar8/nw4ph5S4EznkLC4n4Rv81zxlUkvqJZV4c5/jMcrkSegaJXEH+ZINBWTQBkGL05SlCv2C6xxVHfRO7LVGM0uX4YAnt1PWTWMfuMXSYy4864lRYe1jIrJS4VhALYWFZtkVyQHdRRuheMsbQJ1Y0MYSUfQwrslqUvyEiIok6+fTdjyf7iWZwS0E9Nj3SMJfonfUpuj5ne6lfMgSHmNLdGnUhL9hJcQLsORhINa41UuW2q6mGExP1Ar3mphc/pG8UE5UyHBYAAFv7tBe8PP246OKWI9Gg1jqidpfzgZkXRhQdYPmtj2dCJg1LqctlJtD2nruAcNgJ17EDjpKDb4LB6eQZBldKEhy5wSc3b4ODn5/OhSng7iRYzCxFC8NhW3OCG1Hzf+DmvGUZughlBQpTRPVHWqCOEZ7g05+8eDirpOYv5ow2Hz0A3tl1xG9MvL3U/BBidaewlLM8PIXk+KV9wUV2vrN84SuabcVoLw2EwVz5DL5trTAtOhgQE9x1qzsJ/yAx3f8bTEVv23aTtoMRcDn9BJqOrAxHeSC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j99HUejXHS6jA4o8/kgMMf2PBi/ZxaIfXeq/DLbNtCBkMfQ8dyomifzfVkS2QKb816ncHbQzvVUgzguv03H1rbEE2NzAVZHYNqvKtRPr24B5qNXTFRBoqTzCerOFIH9o7p70CKg/x2JGuF9YHz6ItKgPyA7zDMVfHocTpYoP7aLgqt8NTzyB+jDSob1gq1DbzqarNzXNuN/yRfivuv5uZt5AECGYRv8Ozj8kqAkl5/rw2w0oDOKtXDqbfRMunFRY9tqm+JiSb1uvPxjbTNXJvYvHs8SYh4578xm3V1KWTtAd/rB0GWcdOSrVxkRqjx1CoVGde49D/iyrsq5l+NaatRp40dLwrNHrOup/22lVGtZuFTnWAhm2La+Qb99NZ/j3HLQPnKBuI0d6D9s68njfnoM4rQ/rZKfKqcyy5UV5fQyQ9fFZhK8= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a07cac0f-eeed-4e7c-7e58-08dcc9431fb5 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2024 22:28:51.3700 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DckVOwz9quvV90ELhBJith+ksxF5N9VvSSde5SoZ1SOfrihKK525mZFa5HN3Vja3xPkI4XUJnkQJ1tArbxV0v1DE8qfHbbRClN51c6dnprE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5077 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-30_12,2024-08-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 malwarescore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2408300174 X-Proofpoint-GUID: 8gCfYSgDybX_XU2oGZnpes6XVUqabu7C X-Proofpoint-ORIG-GUID: 8gCfYSgDybX_XU2oGZnpes6XVUqabu7C X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_153635_658796_6C313215 X-CRM114-Status: GOOD ( 19.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org ARCH_HAS_CPU_RELAX is defined on architectures that provide an primitive (via cpu_relax()) that can be used as part of a polling mechanism -- one that would be cheaper than spinning in a tight loop. However, recent changes in poll_idle() mean that a higher level primitive -- smp_cond_load_relaxed() is used for polling. This would in-turn use cpu_relax() or an architecture specific implementation. On ARM64 in particular this turns into a WFE which waits on a store to a cacheline instead of a busy poll. Accordingly condition the polling drivers on ARCH_HAS_OPTIMIZED_POLL instead of ARCH_HAS_CPU_RELAX. While at it, make both intel-idle and cpuidle-haltpoll explicitly depend on ARCH_HAS_CPU_RELAX. Suggested-by: Will Deacon Signed-off-by: Ankur Arora --- arch/x86/Kconfig | 2 +- drivers/acpi/processor_idle.c | 4 ++-- drivers/cpuidle/Kconfig | 2 +- drivers/cpuidle/Makefile | 2 +- drivers/idle/Kconfig | 1 + include/linux/cpuidle.h | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 007bab9f2a0e..c1b49d535eb8 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -373,7 +373,7 @@ config ARCH_MAY_HAVE_PC_FDC config GENERIC_CALIBRATE_DELAY def_bool y -config ARCH_HAS_CPU_RELAX +config ARCH_HAS_OPTIMIZED_POLL def_bool y config ARCH_HIBERNATION_POSSIBLE diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 831fa4a12159..44096406d65d 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -35,7 +35,7 @@ #include #endif -#define ACPI_IDLE_STATE_START (IS_ENABLED(CONFIG_ARCH_HAS_CPU_RELAX) ? 1 : 0) +#define ACPI_IDLE_STATE_START (IS_ENABLED(CONFIG_ARCH_HAS_OPTIMIZED_POLL) ? 1 : 0) static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER; module_param(max_cstate, uint, 0400); @@ -782,7 +782,7 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr) if (max_cstate == 0) max_cstate = 1; - if (IS_ENABLED(CONFIG_ARCH_HAS_CPU_RELAX)) { + if (IS_ENABLED(CONFIG_ARCH_HAS_OPTIMIZED_POLL)) { cpuidle_poll_state_init(drv); count = 1; } else { diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig index cac5997dca50..75f6e176bbc8 100644 --- a/drivers/cpuidle/Kconfig +++ b/drivers/cpuidle/Kconfig @@ -73,7 +73,7 @@ endmenu config HALTPOLL_CPUIDLE tristate "Halt poll cpuidle driver" - depends on X86 && KVM_GUEST + depends on X86 && KVM_GUEST && ARCH_HAS_OPTIMIZED_POLL select CPU_IDLE_GOV_HALTPOLL default y help diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile index d103342b7cfc..f29dfd1525b0 100644 --- a/drivers/cpuidle/Makefile +++ b/drivers/cpuidle/Makefile @@ -7,7 +7,7 @@ obj-y += cpuidle.o driver.o governor.o sysfs.o governors/ obj-$(CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o obj-$(CONFIG_DT_IDLE_STATES) += dt_idle_states.o obj-$(CONFIG_DT_IDLE_GENPD) += dt_idle_genpd.o -obj-$(CONFIG_ARCH_HAS_CPU_RELAX) += poll_state.o +obj-$(CONFIG_ARCH_HAS_OPTIMIZED_POLL) += poll_state.o obj-$(CONFIG_HALTPOLL_CPUIDLE) += cpuidle-haltpoll.o ################################################################################## diff --git a/drivers/idle/Kconfig b/drivers/idle/Kconfig index 6707d2539fc4..6f9b1d48fede 100644 --- a/drivers/idle/Kconfig +++ b/drivers/idle/Kconfig @@ -4,6 +4,7 @@ config INTEL_IDLE depends on CPU_IDLE depends on X86 depends on CPU_SUP_INTEL + depends on ARCH_HAS_OPTIMIZED_POLL help Enable intel_idle, a cpuidle driver that includes knowledge of native Intel hardware idle features. The acpi_idle driver diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 3183aeb7f5b4..7e7e58a17b07 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h @@ -275,7 +275,7 @@ static inline void cpuidle_coupled_parallel_barrier(struct cpuidle_device *dev, } #endif -#if defined(CONFIG_CPU_IDLE) && defined(CONFIG_ARCH_HAS_CPU_RELAX) +#if defined(CONFIG_CPU_IDLE) && defined(CONFIG_ARCH_HAS_OPTIMIZED_POLL) void cpuidle_poll_state_init(struct cpuidle_driver *drv); #else static inline void cpuidle_poll_state_init(struct cpuidle_driver *drv) {}