From patchwork Tue Apr 30 18:37:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ankur Arora X-Patchwork-Id: 13649862 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 15FF9C19F4F for ; Tue, 30 Apr 2024 18:39:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=VEcg6QP6vmYP3wa46FHt1Vs9EPuC4SCJlAU7f71Pqf8=; b=mTXIRq15iuuzRU yO+ESu0KrN1NJijiRyCmM+Z7v0Xfj1hrkT5uiSfzitm69IQQaqsgWTIxF1QAZARdUSuqM++3Qv4S+ iNwsfrQ2mlHYdw61hkAvn7D43YzvxhG7y0HI5az8JYeh+2xFYoV8ZPhDCSlTcB1Y7YpD7/vBQtzyA UekH50+k/2TTWotv1/IxI/4GbPNbMh5ZTaSTDMgQTwk2KM+Gksm2y1j2FNyQ9qgTqoUXAsDgivgee rDN1lIxg7uw2IDbJNL5N+JqRCDJoHSR7Ob5871Ug/MsqpJ52SSbIOZyjWAVrwNPh+AUGQaqJ6e1oR iFfF07W2ZxwfB7HHZbYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1sNv-00000007bfS-3XqY; Tue, 30 Apr 2024 18:39:23 +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 1s1sMr-00000007b9G-2pJw for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2024 18:38:21 +0000 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 43UHIkop026936; Tue, 30 Apr 2024 18:37:49 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=9JPGZCPhmr2BbOmo0OZVXiCt5Je9dfuGj8xVEW23KiM=; b=gzMEjh+EfflrEOFQSEKOK4YqOSvqvHrpo4ZGfANgue7sk1Vj95loqQsHGcpNyHnoM3ES q49CT2CuplF4a2yp/XeJzjFcxGLgfPnHmh+6+//Y/2dxV0dm6J0S188W1ocG/6xoV3Ek bIGu4UPhexMbcDqRXPuyAM0EQNSklFsSP22B73x2SvINBNZ0OhWsxU7fB+VFhftYdIZH MuK2IPkbVZ3UTZsqNH4OYB+LV5QXc9Xgyh3QsYo/HIeLHCKn3vDgPLHmfAM0NR23Ddak fVP8i9KY/eADaIwwoiBjDD9U2UcUx5maGlfBE7EiT9C0JKupkBsfT77GtPyU40WmRewl Gw== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3xrr54duk0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Apr 2024 18:37:48 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 43UH3kuF016678; Tue, 30 Apr 2024 18:37:48 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3xrqteckhe-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 30 Apr 2024 18:37:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ocmp7aWZmc8fMl+A8S6QSn4lIRSYYqM9r0zUbUs9V+72Lrmn3LPM2F/hL9D5BaSP67V3hX150okPMMAR/dO2Ll+WBuSfMvbVI8EzUnsnr5h+Sv/0kdyqALPzSIdZSO+HxIolylvATjfoYVkVKF+5agWo7s2bJBjaT9HPlDRPk7oK050agKjt7V13Rssumc5Kn26iBifRtwvWfn2a25rH90e9qnN1N68HImT+23Uy5br5d6WpkYj9TKuoKbTP+r5gBbCrzIZbqGMJNKhqTu8em675IctkvxJGekPBqEY6gnBDVM32xvyBlcKX39mzkJFc89gbQT+WBSGylLVOx+h3HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=9JPGZCPhmr2BbOmo0OZVXiCt5Je9dfuGj8xVEW23KiM=; b=OXBOsLmhpkUcOdEijv3+YkmvByMGRkdXaqy1KpFCb5/TZi/i/q6OzQDwI6DfkGB8Hz7w2GmvCC1u8lXRBA3hSl629VTbTyVgi3RNWvxCeh/JUH8ay+gtsgvTsBzwGSFlAzJrUB6j+61IlchTuBaShYzeFOdXgfVdssgkQnmP+mKGzfbW8a0W0+RvvC0IcSr/g86s8bCiynW33eCxwP4UMu3lalan8AN3am0c2uv8EwMaLToeqz4rJe9tHwRvJsUOvnitFH2S6z/blch5kc42OPIbacoI+ni36LisbWv9Z+JAa1+PWQ3tJ0r4GSXk2+JETHVdlFT1Jr8t7dkugTp6VA== 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=9JPGZCPhmr2BbOmo0OZVXiCt5Je9dfuGj8xVEW23KiM=; b=i8MxIXOXSWYLZZYla8/yz5sM3ubj0/cvn+QvuXZLvfrOz8V3lmHkprFQvrXTbuKbOym5PzjDnlK2oOOFMKS4LXTTNFkLHb+u4bUk607tXXbyWaf1oyscJPYd5EWW+bQW7+QIns+5KcfuQQc3x3WZbR7uFSrubXrz86VuDnYzBmE= Received: from CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) by SN7PR10MB6308.namprd10.prod.outlook.com (2603:10b6:806:270::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Tue, 30 Apr 2024 18:37:45 +0000 Received: from CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::4104:529:ba06:fcb8]) by CO6PR10MB5409.namprd10.prod.outlook.com ([fe80::4104:529:ba06:fcb8%7]) with mapi id 15.20.7519.031; Tue, 30 Apr 2024 18:37:45 +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, 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, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com, ankur.a.arora@oracle.com Subject: [PATCH 5/9] governors/haltpoll: drop kvm_para_available() check Date: Tue, 30 Apr 2024 11:37:26 -0700 Message-Id: <20240430183730.561960-6-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240430183730.561960-1-ankur.a.arora@oracle.com> References: <20240430183730.561960-1-ankur.a.arora@oracle.com> X-ClientProxiedBy: MW4PR04CA0068.namprd04.prod.outlook.com (2603:10b6:303:6b::13) To CO6PR10MB5409.namprd10.prod.outlook.com (2603:10b6:5:357::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO6PR10MB5409:EE_|SN7PR10MB6308:EE_ X-MS-Office365-Filtering-Correlation-Id: ac21ae12-2b91-40df-b073-08dc6944a084 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|7416005|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: TOdv0xjMDIvCIEsQNOhSV0RmMWfcggzRainQMT+M2yOXs+Dzhb1AzU+IAiCROfde2W8PU6SmWmfw19UUZ5RHJsVWpChfwqJEgmoOhJcfKIwsv6uYVf9D14JM2pUEaobV9JMQdZdbXriTqwiPk3ISbhDWyR/BYXlKUTMGsiZJCxVlQxDF2ddFZGcZiD1T6YDh1YKvV1pQRkLqOXBlKRnLwb0dV72cvHiardLx5bu1HnFWnhhp9/wT11y1t6a8bKmCtnQI+JIrOOY6Lhr1dapwfQuWDUrovMXz8p53MSC/a7nGvyuuBmq5iwKELgV7xUg82BTtbUzYXBZDeJn0/l+lzhL/y63s4ZSxqfQrvWDpjWoAsNVNhKN3sLDRH5DOBCv2aMB+ivN+dFxzjVw1Q8bibaA904tleIApGXJOB1dk9AXfmdiw8iZpmmQsRt7fuHd2fkOpGavJjnJfdf4mQz5PjKwM6GOvRlCOxsGWM6IMFtd0nfZ3jA/SgC+cbyfA6LrPYEezAC64zpOAKBCPffGv/nNCzwcfluX48v+EvRp2msqH3E9T9HGmp7ULqZ+MO49i0p2dLDNYVBfxGITw+u6cirXRi2zazx68K2gzUCejCdUaVVnLZeVUqTblGBm5YHhWZk1PWw3fjlXKZhhTXdlg5JF/JW5x+Z3Hd6JqugzgR+sWA30ssUUm+EyyCjf1vavJpU+mhx4nUcUYtpuW2uq4Rd5i3a3bufxCmhvQDdtk6h2KJqWusQEWvwMxCydjsYdYOrh67HMYXTQBPv3OAYpe7GewdURV4U9893Qce3O2btkscca/6xlnkUmYsvGq4yy0Nk9pwHi32mNCH1w3g4ml+OpQ7hY5gJM8osMuskB2JHd4+9qMT3lwcaxKjgxwfQVQRMoA38wYp/LvJsrzhd7Zzf4YINYpiiegb5kjqlrQwZNIwWFK/H5MTb3gpvdqcXLyn1NWAvlKwHcJICtBcZtmvknNs+4q91aY8f3OY6+S8qus4/70wuDnD6CWFF2e+b8/jD/7YT8LT6ErGSqDy+IBz6Rrdwu70tePz4QFaz5D2cJmLiGn5vDl0xEEKr/K8fiQHBij9E9s+lO1cWd/XiYe9pBJR47NMy2jfYljDb052ycQZDUpmOxMITcGoikAmH5MXve3WFIg5ej+4rikKoE0fi5U4q/3cqOULS3FNufCe2kQtNGHTURe/HLbMYPB0ZoNkgHZ6rg2z2iO7INW6C006haZZ7bQx9NQD8MhFbkahwDvmWdGCWTi2W00vHDFQIpok35wxTYs1z2Lz5rWwvYHGQ== 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:(13230031)(7416005)(366007)(376005)(1800799015);DIR:O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9g3JhVggRZbUKNHzhhxpe5uu6xrJOhf5h2Sw4I1+GQ7omAcv44Z2MnepfGNOqemYTDjcaE3JSifhaUVKDfdCY5qK891b8+YgvydwnJhp+QobAcn3PhbCQoTMmiXoyRd3b1492gWmULGkZUqKWir7FuAMQAx/LG0mPpIE5/V5fzXG1uIMj79cwd//GMV+MeEl3KGvHG9KkCMshnJOZZKB6314lgK81u9az42iSI/jN/zdFa6qwK1mEcvRmwFQLPM+HTH5YywE/jogfwjMoKRhgr8KAnD5E2GXyvY9Q/9V9ZRZ+toB6QPu2yfg9FYP42KhgVosloM3QI1UEmQVawgWmA4XvpJTc3l7X1Fm/CdJZlKxj0YBs+qzD7UWDdGif7m6cOY7zrzhscqAeYVM+FaV/V+kGyDhZGKliZTNhAPLxwmarRhyjOKer+WiCdWX4PEOEGPF2nmy2GhGxJBL2R0Aa6nYU30kiOMFPHEJFoBDizh8ta7yi2rM3ozzu9WxVg269oOqOyyBQ8TcWhaCue92WOknMrwaAr/+FNzWtuc5pdUKhkEVNBKqzL2VxgEbq4B+duY0Ch7LKe7+K120oMfTpg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 7vNe+m5zxuJ/SCcoGoGRzp+3SK4tdD/VRCyJIiehMZQH1xPvSAqWGxze5qhNofTjJ59SoLTjDaeLAZjjnqgZ7llLRK/jqWvRG7fPBe6wBb7754UsSCTnQAIZJKXkXo/keuPwYjjWTu2p2XABTKLfK1pOUGzUKH7wkSttjaKh6F/WJthJObis1xYjoBWajTYo5cZzFe2xEDaaMtkutafdSMIn2WVVXar0lcmCkzywfrjDPj1kcw5jat9hYHebjEuPLPmh4mMxkRoKO6nxdNPBDOoxiTl83HamVpaHSadZeGcqWOVAdKply4Upn/lh5z31uLz1F51gLOGbKABu4i81OX5LyLDs6AMuvcF6X5C403JqIG0YU1knHPorU2d7thHRL4UPfcFIT5bgU5jd9ioO0Zn6UOaBp2umay0BDLPfGcSt1qub+zJ+wSLdFKyXaZ8htdRxPn2czrViKBsWouBq2Ji5W8CDCTq6SnF7qWBJaxjAUmeGxcYudRxjAI6pGjoP+BaHxrvDyU7pKrvzPycETNtYj8NOhudyb7OacSfXBAUQaPkZSNjtlEA6ptSSl3W24p7/qBu3IpueAea1Emb/r2Iez4/ued46IW+3pekafQU= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac21ae12-2b91-40df-b073-08dc6944a084 X-MS-Exchange-CrossTenant-AuthSource: CO6PR10MB5409.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2024 18:37:45.2553 (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: 4HWGiMHREaVYUuqKkw9B7p2dEKR9xh7VM4zY6mjH6abdjLhgQ1JqnBMdFwUSvWrPY1XMfMA50jx3LFnJDK7OV37ggI6h+6qTnB/roTK8Rfo= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR10MB6308 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-04-30_11,2024-04-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 malwarescore=0 phishscore=0 spamscore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404300134 X-Proofpoint-ORIG-GUID: Hw59kAtNW6V46ZzTe_vDITnKR1P0Sm_K X-Proofpoint-GUID: Hw59kAtNW6V46ZzTe_vDITnKR1P0Sm_K X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240430_113818_386903_419AC355 X-CRM114-Status: GOOD ( 20.81 ) 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 From: Joao Martins The haltpoll governor is selected either by the cpuidle-haltpoll driver, or explicitly by the user. In particular, it is never selected by default since it has the lowest rating of all governors (menu=20, teo=19, ladder=10/25, haltpoll=9). So, we can safely forgo the kvm_para_available() check. This also allows cpuidle-haltpoll to be tested on baremetal. Signed-off-by: Joao Martins Signed-off-by: Mihai Carabas Acked-by: "Rafael J. Wysocki" Signed-off-by: Ankur Arora --- drivers/cpuidle/governors/haltpoll.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/cpuidle/governors/haltpoll.c b/drivers/cpuidle/governors/haltpoll.c index 663b7f164d20..c8752f793e61 100644 --- a/drivers/cpuidle/governors/haltpoll.c +++ b/drivers/cpuidle/governors/haltpoll.c @@ -18,7 +18,6 @@ #include #include #include -#include #include static unsigned int guest_halt_poll_ns __read_mostly = 200000; @@ -148,10 +147,7 @@ static struct cpuidle_governor haltpoll_governor = { static int __init init_haltpoll(void) { - if (kvm_para_available()) - return cpuidle_register_governor(&haltpoll_governor); - - return 0; + return cpuidle_register_governor(&haltpoll_governor); } postcore_initcall(init_haltpoll);