From patchwork Wed Jun 26 04:27:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 807731 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2080.outbound.protection.outlook.com [40.107.243.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C08F1369B6 for ; Wed, 26 Jun 2024 04:28:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.80 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719376096; cv=fail; b=gxQ9SwqYm7ZtcqI/f/+nokDrFXTguy0SUfLFYo9LQi2kQVOuFbIric7bAi1EEmmJBJnx3yEi+xshf+/Sh10Upqh5S7FaX4umgPTubGShBkLjeAOdPifm2rKVe8eo0EGycHqhj7sFgJ7SAOjoHIrrG+y8g9TLUfvBDnDmE0o5TTA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719376096; c=relaxed/simple; bh=Oe8YtLHUBJUhHJnyvQEwpkX7Qtlqk2flHaqOWbrY6aM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iJeItPaNvm0jX8nXdP5wkxWdelMi0MRJDZ2s+CUxJWwZWOsUA21qbMSybMoFJ7WolGsaqYE49aT9WsLqNPdkSPR3GAfZIa/8aoFgiJd4Pkr/hdXw+bGJxMjKYxEu6BXrHSp6HuI34UZmDkn4AWbWikRZlwN5vmeGLhJn6s68L1I= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=Y7LjzPbz; arc=fail smtp.client-ip=40.107.243.80 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Y7LjzPbz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XV1AVu3VOkZMiWRzZmv2ojIxmccNVs3s4cw8KlvzKsoKemeuz9K92oicwI1UQ4hdeKPBc9a4IuFc3aN0tn7im7q1Khm9hgKW3XcCekmP7Uf+gniGjVkX8b8CQ0jxEWD+uHz7kH4t4DXW2PsxhFRV15CaF9rGMvghdfNuJ/41gIvcr6dshLz42njliVK51RnCJFc2nUzqjfXNosyLlflVwtx2reXMIKBu9amMETGpeDrpHP+HWntyUSo6gPO8nfF/2ucnGtq/6eDn6QXqVokuNxvjkQGRvUc6raEZG+22usKnKPcK+4A5yhwYIcHGYAsOaVBo+maddeHu3hHf10FhGQ== 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=2ly/5AEwdhHtpVOe9oXEk9r2ICwYbhuLDSTpauN8szw=; b=V2+OOihTm6Xv05eTr1jQKmgvIHQxigN6oSLHbHIiv9XUjisRJ6d5vUpn6dKKCoKMhH3+Q30ihIQRYhiobDXsSgzeaugMXKTTSL4mMG0ET9nR5haCIFGeNHYQMPT6HOiNhYFxN2a+is9u2W7iPF5aMqglGXXUaCQtyOhZrbGESCzKjuUdEQPGJixGzLoILtAwusrWfO/37E5g+5HfZlrRjioCIP42uf1p+hVxP1kQNt41SJY3StOxoi1/Nwk/KjBuZxqJPvSTLdMB8TWSVC6vJD9QNwbqOmx+n+86SRxkp4ASJ1RdSjLO5f0ACo1MeVKUcLQuGsW9mZgw6BTWMLqg7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2ly/5AEwdhHtpVOe9oXEk9r2ICwYbhuLDSTpauN8szw=; b=Y7LjzPbzHVvvFHz1Qun4S2wjKAYy0ClxUCryCj/Eo4rKINfKlpJTud4SFpQ5RF3HgWMh3qvSvXc8hnic0QKpSX3XAGe5Oht1/IBDNuNFEnxHqLVNAJFmA0KWfL6uiTOy39tgVwgSzq4jKfrX5s664OFps4SKs9QHZ+TbPfrj7HE= Received: from SA9PR13CA0106.namprd13.prod.outlook.com (2603:10b6:806:24::21) by DS0PR12MB9322.namprd12.prod.outlook.com (2603:10b6:8:1bd::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.32; Wed, 26 Jun 2024 04:28:12 +0000 Received: from SN1PEPF0002636E.namprd02.prod.outlook.com (2603:10b6:806:24:cafe::ef) by SA9PR13CA0106.outlook.office365.com (2603:10b6:806:24::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.19 via Frontend Transport; Wed, 26 Jun 2024 04:28:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002636E.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Wed, 26 Jun 2024 04:28:12 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 25 Jun 2024 23:28:10 -0500 From: Mario Limonciello To: , CC: , Perry Yuan , Huang Rui , Mario Limonciello Subject: [PATCH v15 3/4] cpufreq: amd-pstate: Cap the CPPC.max_perf to nominal_perf if CPB is off Date: Tue, 25 Jun 2024 23:27:32 -0500 Message-ID: <20240626042733.3747-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626042733.3747-1-mario.limonciello@amd.com> References: <20240626042733.3747-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636E:EE_|DS0PR12MB9322:EE_ X-MS-Office365-Filtering-Correlation-Id: fe1b9583-040e-44c9-298f-08dc959863d4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230038|1800799022|82310400024|36860700011|376012; X-Microsoft-Antispam-Message-Info: 7KzESlz9nttqgLN9gZm2ipRCOGxaFOTadsRRsIt8k1ncWpTSiMnLbpAJkq5j6HMqOSEJQENZ+agVaTgCj1vxnk2t50DwCifBSwt1xMJTYYCc5vjxpmZg0vQ4/Q96ZCW0hOBtvqaUBJAPm8J3ACkjspkrir1+A7FMeFtG7wQ0+f8OD/NuuhO28PaK4pMCAkdLDO3JTM89NlJcndXel534rIMzvP6ZJb9MHJvISiUgo/WcbNfLiZEsFZVN2fHVTsyDzMFex1C6XAz09ddC/ZjyfRMAic0mRFe5nuLXxTDVcPqqW2gLSK5RCaZHkedqXQWuAROJAJRIeAzkiK/dTD9C7/8c42KpHQHoJtHtzrlwyftEtXeoQfhvNJw9uFdRjmwX3Gm8zEPANbFiDGYC4ogp7bvuQq5vHWU7w7cB1rWLRoz5G6mUGALhfUodGo/p7HUQkr1YH5Lq1NkYYWN6YwQimtoIMSmailUQvgkmWf9TZlGZVBHaKe1Qqjm+mpblpiLsUmLHDg17c6mgvxpSMWG/ppDsNTpN3sLkxuhZ3TpGjL/8wviqhsUUg2h23RYuxJpmZ+QIAH4pPGWk0HWRfMFp+csDGTJi+TdRVHcxTCRURMCxocZcjbs64pwC/oT2lLXFDSVAOPsHIxwKU0iOfaBxSl0og72KqBRpyN3NwdMfbTt50hwzwnRsYolr7rKIOothQQnojTAffxT3E2sBWIlIQZgfnVtDw8017UUIDwKFhDO5yq0423FlbzF09DlY1btoi9XYZlPw8jPvFY1LVyD9GYnsI2kFZokPijP/63tV3mnuYLoqY3o8nBit+IaKLldtQE9FRk90ZoLZ9uVibib/OOmFYy8SQCozNAV7mG+tVf5/hX99haZAbjY/9VgvTd19hbLwQvc62LudFsmc6uN2Y4pPyvUbYKf8siRQHIxxGXsLaMgpqx+h1Jh1qdhG9MN/oNLYh3699W+vz5MgtPrB+Wrv3mi5FYgOc4aVzspszTOc3bApPckuVuvvfEflHUCHHSPSJYs9ABKLPIbgSbTsb7bF1rDR8xELX1hyq5/bIIdeWkAYFLoCOQ/umhf5Svjlq/GGgrGL0w0VOuN/dhXiw/JrgOimpt1ltFyaipjHLSQ77SL3Zh0CN3LG6voqpn5LnHUUsEXZ3dAPnM4o4ZX9NFhci+i4lW8LLE9pqy97xBeY2x0vn3bf8PkoadMjs07W2NQJiJwFqPVovSX0W7TQvKKKDwRz8IbwGU886pqUMPewmEkllUB3YxnyuAZJ0DZcwL2iihXAYKbl7yqMcvuLqp9ajOXySqgl6zEE8kUyvBoGi+ke0RU6EASE9sZ6ftigZ+lry5unvU3F0x4iKvMb8lnXgNDJESRvSRz11RvPLRg= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230038)(1800799022)(82310400024)(36860700011)(376012); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2024 04:28:12.1246 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fe1b9583-040e-44c9-298f-08dc959863d4 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636E.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB9322 From: Perry Yuan When Core Performance Boost is disabled by the user, the CPPC_REQ.max_perf should not exceed the nominal_perf since by definition the frequencies between nominal_perf and the highest_perf are in the boost range. Fix this in amd_pstate_update() Acked-by: Huang Rui Reviewed-by: Mario Limonciello Reviewed-by: Gautham R. Shenoy Signed-off-by: Perry Yuan Link: https://lore.kernel.org/r/66f55232be01092c423f0523f68b82b80c293943.1718988436.git.perry.yuan@amd.com Signed-off-by: Mario Limonciello --- drivers/cpufreq/amd-pstate.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index db4fbd8d1e06..80eaa58f1405 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -514,6 +514,7 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf, unsigned long max_freq; struct cpufreq_policy *policy = cpufreq_cpu_get(cpudata->cpu); u64 prev = READ_ONCE(cpudata->cppc_req_cached); + u32 nominal_perf = READ_ONCE(cpudata->nominal_perf); u64 value = prev; min_perf = clamp_t(unsigned long, min_perf, cpudata->min_limit_perf, @@ -536,6 +537,10 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf, value &= ~AMD_CPPC_DES_PERF(~0L); value |= AMD_CPPC_DES_PERF(des_perf); + /* limit the max perf when core performance boost feature is disabled */ + if (!cpudata->boost_supported) + max_perf = min_t(unsigned long, nominal_perf, max_perf); + value &= ~AMD_CPPC_MAX_PERF(~0L); value |= AMD_CPPC_MAX_PERF(max_perf); From patchwork Wed Jun 26 04:27:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 807730 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2085.outbound.protection.outlook.com [40.107.244.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12566175BE for ; Wed, 26 Jun 2024 04:28:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.85 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719376096; cv=fail; b=h8uYQQGIYODEMDrwCD5c7211DGyZC/VlLNpZJ0GRw4HcXC3MM1CqLIy80ePjVhEbO+fBtlhYG+WIN25Fx2CqEi+Pt16TEl5cpMQJr0i8rV00Eo66B/TCU6hUwqgb19CucKWgNKUpWbf52sUQPz0wvdmuWcYcJ+Q+uaCyUqYtmEk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719376096; c=relaxed/simple; bh=ipLIitLZYtnfhsv6GaTjy4yPkCi2+qQV0gv/pgbxyL4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QRfLAtWjHDl9M+6JKQajpYWs6fE+nFctz0C5c3wJhbctc3U+PuxHkc+mA5lkoahwt/t/CC5DWKh6cBVFjm8zfwTAEztScyLJJI2XwKVEPs4mQDOWsd+Vb/4wUV3X/sTKKKbOVWgFFPpCX/cjKUhyGMIuizH14SrUQuweCIych74= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=FWfETUaI; arc=fail smtp.client-ip=40.107.244.85 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="FWfETUaI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m59U3Dl5LBE9iM7KrlCiLGax9kWEfk2UQGLn0Y8h2NDtmneCMs+MYww6Z2o4rr2nGEUz+quhham87Gyju4naz3XCszww+K4Sg/z9JeItLPbBIgpc2w4QGmc0fdGpvafs8bQDrS5wXYnDJQL6xEy192IxJc/WLGatqocS0pSPryuRilxZQFztd2onVnPraKTJAEb8l+rsiQeZCHvEHMCxR5zp1+WVayaDMe55WGzGdBz2q50Whp4pKMIa4NzmgaXPAr8OEhWRIFZRlpVxxAxzo0JCeVgoGaj3EhJiPZFREGiYfM01E39Mv4LRPvYSQZ+Pz4yVEvsDCc+ml0ZkXeRTLg== 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=Cf7UKvr2A+bHUT40t8nkE+WAwzck17QHsmmC5/Abzy8=; b=Q/d+Mv6X/QGJlUM+wdslvy8czTPIjlRYjFrsLd9LB5utvH6hHIPZBy7tr6r0F7LqHsJ4KbEHn0qKE+t9Mgn5D2Pj4lFryi8lbZ5OyHGQh0QG97ry9EdRh6/uJwaNZ4Y84Go390Fi4ly0YypGv3gkQX5Efzw40lC2wJ4tqbUn5sM0SDhOqyKH9UuajM70yEkLK31mqHdS4PX6ceWYVbMI7UBnjoBYeHJB7NBOU5S19nmACAHF2ahBU0aUXgVYM1yUxRy2wYGLemacOw8Um0jlAVI+JnGXhfPq0sCKofvIqIoW22lZgvsY2a66qGbfF4ym7JSce+y562cStH5qHKEcGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cf7UKvr2A+bHUT40t8nkE+WAwzck17QHsmmC5/Abzy8=; b=FWfETUaIbX+AOr9q7sXE0/GVYlUBeCmvFMRiDJ+faHIeIWeh+EUH6zzDBj+Wk58tA+skJ/7HHURsPsnzePFmiEC2MQCLp9ziZfWkg0ftftFKjMbK2G0vCJbIEZKAJZMNgOVZw7xn78linsnTIzIIUcnWzSFu0GN1pVlVRXf+ohk= Received: from SA9PR13CA0093.namprd13.prod.outlook.com (2603:10b6:806:24::8) by DM6PR12MB4249.namprd12.prod.outlook.com (2603:10b6:5:223::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Wed, 26 Jun 2024 04:28:12 +0000 Received: from SN1PEPF0002636E.namprd02.prod.outlook.com (2603:10b6:806:24:cafe::83) by SA9PR13CA0093.outlook.office365.com (2603:10b6:806:24::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.18 via Frontend Transport; Wed, 26 Jun 2024 04:28:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002636E.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Wed, 26 Jun 2024 04:28:12 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 25 Jun 2024 23:28:11 -0500 From: Mario Limonciello To: , CC: , Mario Limonciello Subject: [PATCH v15 4/4] Documentation: cpufreq: amd-pstate: update doc for Per CPU boost control method Date: Tue, 25 Jun 2024 23:27:33 -0500 Message-ID: <20240626042733.3747-5-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626042733.3747-1-mario.limonciello@amd.com> References: <20240626042733.3747-1-mario.limonciello@amd.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636E:EE_|DM6PR12MB4249:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e102380-9ef1-4847-4db8-08dc95986419 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230038|1800799022|82310400024|36860700011|376012; X-Microsoft-Antispam-Message-Info: 43HI1uGdTKmJrT8Zi/Mp5/YjCaARxF/LdkEaSpRdjM99kfCJe9xW18AVbSIM36SOskTgNcBtGALeekbk+wEEBty7HmE5XcaOsgpz+NVlavvw0dpdnuUHKITh3im5VnkNiZWx1nQIaEB5F29I9UBPdfNdGaL6mUNVJtE229l1pp+sYp65nG8C7ez7EGTUfjFh0WMShS9nDKOpG3mc//djEV5rOVjI6zeRKg5NLOZrvN5VId3JFSfHBktPph2jQAIjACMjzC6bpKfcWWWTtTuhR6wWr6ns0mr6NGcWur5b2Z5/LluLmkgA90FTuW5jbETz3fImBBjWOBFgrrCFCW9Z5LPoEeydH+Vb2rPcyeMrmJFhcPxzW3QCXAudyuRrt39KzLNPhQr417x8qKonGozA+VJm22u0VbgyllcGersem1Eq5sswUjgrLsJNiQvAgVrU5LOI/FoIsbyg7VlXPsh8cRYjDedjFXRFP/TMgLz55gzAesMTYaU/NF3Bn/+m5wQvkX7/uqCJt4+pptcZoeLahYg0xNk8HQxz8aNSHII+5vhQxBfExMNotiyY96bWz6eUvswiuOCFkJzsnaTktAzeSnrWXH2nn0HC/GulpKamf7ibzpJS4RoBfkdgqM29lrxzFjDJSGucwaZlAuUveK1ucskggEZr6w+9SDDg9jSFZafSWbPgSWjzDtGU0jrKaOQQlba5pp/qoxoCPrGy7SBezSmiydJFqaqqE8vkfwCbsdV3n8t4gW/qZ3X+CWw5RSqlkHBgiagULOSF4hI8xlvr993L/IOrOVxmWAfr0oeF11k6z9IKPkj6YSeOtc0Tykdn9gfgLSM/GtgVlOYDaeN8YCP2eTRbObwpXTI93jdSmSlYshltO9cdBnPJ8UyaDbiSGoKGVV04eaaI0e7YtWHOpoKjn4lux+6B18esLRSJmcZhc9Tcy+eYvTqaIA1UE5ovlQ+OvisuQJYjkgDtwZsOL1lfPU0ndtma5cRSiARlsyMUUcjJ1IBiGZsyeiOzGpAdDxK2TONb5wbUNfrsGemFiNbuEzh5nKAVvN1xdkHhnEyZq6k2SGHwukmdVDnsdTCz7a6DPxpgvCd5vKiX6oh3cQapnfxifMF14KHm3T7KrBkySj0xfPtORmId0ZjvTIj/CdiZGbbLvZvAzVQcBfNxSgCZs804NNpHpoRR+HBwcTZDA/ofb5lawueM2KlYupPNrDY8hA/wUf18Mycq03KgVhj46nzg3SYEWFaMsoaP3U8HakKzUif3MC4p5PiJkcVC9jYCbmnfqhdIEu8dPZtxQtQAltpq2NK5ttTbqOpU7Nj7r1YFH9p7Od6fAWJH+2q5A/Wdxe+VxajLo1Nj0ZvRyoQaapVIEqtmdPZ2lcgsuE/jd96Gv9hBDYBkDK8173dFmIcJiiub0KCNnDLBx9czDw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230038)(1800799022)(82310400024)(36860700011)(376012); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2024 04:28:12.5777 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e102380-9ef1-4847-4db8-08dc95986419 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636E.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4249 From: Perry Yuan Updates the documentation in `amd-pstate.rst` to include information about the per CPU boost control feature. Users can now enable or disable the Core Performance Boost (CPB) feature on individual CPUs using the `boost` sysfs attribute. Reviewed-by: Gautham R. Shenoy Signed-off-by: Perry Yuan Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello --- v14->v15: * Add tag --- Documentation/admin-guide/pm/amd-pstate.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/admin-guide/pm/amd-pstate.rst b/Documentation/admin-guide/pm/amd-pstate.rst index f5ee81419a93..d0324d44f548 100644 --- a/Documentation/admin-guide/pm/amd-pstate.rst +++ b/Documentation/admin-guide/pm/amd-pstate.rst @@ -281,6 +281,22 @@ integer values defined between 0 to 255 when EPP feature is enabled by platform firmware, if EPP feature is disabled, driver will ignore the written value This attribute is read-write. +``boost`` +The `boost` sysfs attribute provides control over the CPU core +performance boost, allowing users to manage the maximum frequency limitation +of the CPU. This attribute can be used to enable or disable the boost feature +on individual CPUs. + +When the boost feature is enabled, the CPU can dynamically increase its frequency +beyond the base frequency, providing enhanced performance for demanding workloads. +On the other hand, disabling the boost feature restricts the CPU to operate at the +base frequency, which may be desirable in certain scenarios to prioritize power +efficiency or manage temperature. + +To manipulate the `boost` attribute, users can write a value of `0` to disable the +boost or `1` to enable it, for the respective CPU using the sysfs path +`/sys/devices/system/cpu/cpuX/cpufreq/boost`, where `X` represents the CPU number. + Other performance and frequency values can be read back from ``/sys/devices/system/cpu/cpuX/acpi_cppc/``, see :ref:`cppc_sysfs`.