From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.61.23 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796390908; b=Y1IE9UEwzlyqZDp2ehJPXoVQXbH2Gjb2CJcZy5bJqMcfnbCUhIVVtHk6hfGAVui/gDTS sTEqObofIhe+ICWSfcKGDIxXXcnseNxVOU44S8l6yTFRMWCJ05ZzElrqjavINyJ2fKDck f0b/BZUqzNxEcoBEgWJinkNekn8E/VWu5R0pX04WNNHK3yyjVXHEY5NbGfR/90t66GjHo JWRTn/bkQ8hfyZd7H2gFkQr+Cn1A0NYiM/QiTz3/7HjN6hZZpdHoGws3SGvTXUFJPqZcY ijjed6xF7Y8peLfJic5gd2qs3d7Uj7zWXgLW8rworfRmW8VZMqKF0QCb0cYwGPi9YWQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796390908; h=DMARC-Filter:DKIM-Signature:Received:Received: X-MS-Exchange-Authentication-Results:Received-SPF:Received:Received: From:To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:Content-Type:X-Originating-IP: X-ClientProxiedBy:X-EOPAttributedMessage:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-Id: X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=C4SBLwO+l+MEJDio5fmiYH3jJQMBq+9Vaf4Nuue16gg=; b=EKIWj7HUKGp2ovgaNUBVeK9lkVib8bKFgVq73ofXtUeKUPKGn6CoFuHHMhao9QFwGR0E NmzyXVW8S9rlv5q6ewdJ+ihtAaxrGtE8ey/JVaYCYXNAQO4cveX2Xd9hFtyWeAn3LcoQ1 Ed3bk+Jf7+13zEdeeQsfSZuddOiDv6i0V9gpVpy4ebDwXoe0cQj2NV78UdcwPAZRSnn68 x9/a/8D1oZg67gU9FaMQ2J6imM/a5ztZULkBo9ee/8rzjJ+CuI4zk0pHR4XxSIioR05XX bwODEW9ScRwYdQjKM7WY+RRE9OE3b+QwARhwkbtWOPx2QvZKPDoOpFyOR8oT16e9JFw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=pu24BV5a; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.61.23 Received: from DM1PR04CU001.outbound.protection.outlook.com (mail-centralusazon11010023.outbound.protection.outlook.com [52.101.61.23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73D68606A322; Fri, 4 Dec 2026 13:28:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 73D68606A322 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, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=pu24BV5a ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hmn3/pvNJNKNUYwHQIzGnaEI93ksHzROLGjkfpz2hBNwMfeLU9YzMKlTEh2gBbhZaLKtmIGOqln1alcA1KGftS8S8xZgSEux6nXoou4MiD2wYrWohN1PlWkgMJeKQN18hAQGgCIQtr1lZgQDxFm9GBDiHwyPSSBJyB+RW432fLG7BPH8advwnRS85d+tUNeRBE36uM5rt2Ac3oIvIr31zH0cnYgEpKfcUeX/S2UXSFI3EDhnqk6rOwS8UZ4hbJmuzjpEAd+o+1BwfrAstS93+b7Qbes7Sum+Tly6f4v95YQYHddD8VgqgdgyKrVweuvqLCBBOb45LVpjb8yLap/vmw== 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=C4SBLwO+l+MEJDio5fmiYH3jJQMBq+9Vaf4Nuue16gg=; b=dsO51ip8d9TY1WoHJ4XPTEnIuN4rfLDPZJRDghVrWVd4SomCbMoz0xFhgU6zK228K+gk2B4AIH/Y88CNB11YuqD7lUWIpcCp1b7PZWFBpKPEMnYXuPbduFWAfgLdsRO3EIUEZt4652Q8d11jZXm4SpNrYAt6FfGR0ctC9yEsClQ0WFO3VcGfPJYV296cYAoWR0rSe69XxZowO/x1zyXqA8XALjIrYb3JuVbaHB1K7Lp3omAYQ0Mk0ko+x3l9IcMLBm3CODdSCDhnrv/crzMMxdxloHnKkMlzOjQ7lw2pHskS1z5kOwJLDN+sO76rkF9ln4DH211lLOdxQxUz8P3VCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=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=C4SBLwO+l+MEJDio5fmiYH3jJQMBq+9Vaf4Nuue16gg=; b=pu24BV5aD9MYfevOLNj2d0Uz1dd1EG+dbpQbwcu/CbHA62PYdM6RuiF4yYNpnkjijhyCQETUM+IdCJXtdkqubnjUJqM9kEGnH3UfHF59xFsVu0VSCCSBlV2t98C7nu91gpkfRLxES8bBni8DdeWU8zgUOx20E+2MwWtFjc+F1Wc= Received: from CH2PR20CA0001.namprd20.prod.outlook.com (2603:10b6:610:58::11) by SJ5PPF09E5F035B.namprd12.prod.outlook.com (2603:10b6:a0f:fc02::988) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.10; Fri, 4 Dec 2026 13:27:44 +0000 Received: from BN3PEPF00022BC4.namprd05.prod.outlook.com (2603:10b6:610:58:cafe::98) by CH2PR20CA0001.outlook.office365.com (2603:10b6:610:58::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.688.13 via Frontend Transport; Fri, 4 Dec 2026 13:27:43 +0000 X-MS-Exchange-Authentication-Results: mx.microsoft.com 1; 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=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by BN3PEPF00022BC4.mail.protection.outlook.com (10.167.248.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.709.6 via Frontend Transport; Fri, 4 Dec 2026 13:27:43 +0000 Received: from airavat.amd.com (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Fri, 4 Dec 2026 07:27:37 -0600 From: Vishal Badole To: , , , , , , , , , , , , , , , , , , , , CC: Vishal Badole Subject: [PATCH v3 0/3] cpufreq: amd-pstate: Capacity Aware Scheduling on hybrid platforms Date: Fri, 4 Dec 2026 18:57:12 +0530 Message-ID: <20261204132715.1668516-1-Vishal.Badole@amd.com> X-Mailer: git-send-email 2.34.1 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: satlexmb07.amd.com (10.181.42.216) To satlexmb07.amd.com (10.181.42.216) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF00022BC4:EE_|SJ5PPF09E5F035B:EE_ X-MS-Office365-Filtering-Correlation-Id: fb344037-ad58-403a-5d7b-08df520a6072 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|82310400026|36860700016|376014|1800799024|7416014|11063799006|6133799003|261009221227099003|261009223027099003|18002099003|13003099007|921020|261028144727099003|10067099003|261021121427099003|56012099006|261026121527099003|261026140227099003|261102130727099003|261022075727099003|261022105027099003|261021123027099003|261102123227099003; X-Microsoft-Antispam-Message-Info: mofrODi+hFzD8IZVXaD5644Whh3LIUz1rOBNYHEJwXVFs2Vxm+W+3+I/uHee6FG40lG9UJhBWnLM1RYMvoW2s8zI/Uza7EWXaOEidN8r7Hj06X7RICzxcXn+pU0Aq2gFRqpJZ86FBH33iiZCAnQPHkuuoCApr7j0YrfN9uPE+ilD8VxsFMN2qbC7yYYxaUQYzLJd3mCNaaFkvFayydVL2NhJDTVUju8E1awrXwc3sX4jri3ZuG+AgdE97c1dnZhcO4p7VxvwlA+SbO/Nf0mZ7RDVy0Wt75+AHR8yBqL9iqQIlIuH4xmpl7ZvbFB76RcC9iiEgOumRDpm3nn2tAW8F+40PNORfkkT13lI33Elb+E7mOUBsuEZg45hoWklXtUJ4uIXduI9tlfpPGu+CfqwVHo8Rx18hYh9cEu1iMHkS6DnQVwAk2a5qpquCmwqA71pGPR2a4VfkxK8j6FK6G/4mqY69A7NPBa//0gKC6VfZye1xLTAB7XHdZ51k547LBvX8PoMMB0P/eIV2eFKMpoYi76aGg2ADFp8NW57XYbSMK/vAbxg4WUIoY3Y0c2sTZIo0iyh5KBHLa0GhbcA9al2SIVLXPG/0QU5fB73rpEm/PsoDbr3pvwxfg6XtMBkgkTno6HdMDdc9OmCMXei2PTSjFDxYQ0PhVmyaluMpAY/NT0WGJfwyRX0Ll/YQ3r13nhmSlSutNgj5uMNWhYqXyCBRA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(23010399003)(82310400026)(36860700016)(376014)(1800799024)(7416014)(11063799006)(6133799003)(261009221227099003)(261009223027099003)(18002099003)(13003099007)(921020)(261028144727099003)(10067099003)(261021121427099003)(56012099006)(261026121527099003)(261026140227099003)(261102130727099003)(261022075727099003)(261022105027099003)(261021123027099003)(261102123227099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RN2/5lFGy5VngitcVE3W5lv0C1Tv9j+TsWaF4B+zqShBdyoi7fXeED02TQ5I7pz0xYtnh/7UC+wCjC4uHbn5g9941v0qF5snryYNXP/PjCckKFBG6+Fy+nrkfwYgRqwwwpxqGO7Xv7ADh9dS8mElSM9IU9gvkKQG3cTFEBxDVVipBmRzt5UgptmdByDWH2StX4IUmh/mg0w/RZZMvnASoAnAMFDYfBftibSup783M34Aw5i4jZGflvFZDTpeO7Fi5cLoEzGgnCONhNWHfd92Kfh0ncmF3niO6U1iT6z2zA0O92xvNMJ6b4zADCY5t6PuE+Gggm+RR/dRj3hholQbfdYbYJzXsQVt5cKVS6PNOvrc+CIyytqtHNI2CxCbrqFbLJEc7J95iw4KOK1tLta/P03DeM0DMTNKRJ9C8AP/FGrdbsnO6pOzQV+YRHeizdR7 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2026 13:27:43.0716 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb344037-ad58-403a-5d7b-08df520a6072 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=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN3PEPF00022BC4.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ5PPF09E5F035B This series enables Capacity Aware Scheduling (CAS) for AMD heterogeneous processors. amd-pstate does not export per-CPU capacity today, so the scheduler treats all cores as equal and places tasks without regard to core strength. Patch 1 moves the HFI check before amd-pstate driver registration, making the preferred-core scheduling decision before per-CPU initialization. Patch 2 makes amd-pstate publish asymmetric per-CPU capacities via the arch hybrid capacity scaling interface. CAS is enabled by default on supported hardware and can be turned off with the "amd_cas=disable" boot parameter. Patch 3 makes amd-hfi stand down when CAS is active, since both manage the same scheduler state. HFI initialization is deferred until amd-pstate has established the CAS state. Changes since v2: - Select the reference by maximum frequency, with a CPPC fallback. - Scale capacity using cached per-CPU maximum frequencies. - Refresh the reference and online CPU capacities on hotplug. - Add an SMP-safe topology helper and remove driver-side SMP checks. - Link to v2: https://lore.kernel.org/all/20261125172031.741740-1-Vishal.Badole@amd.com/ Changes since v1: - Add a preparation patch to finalize prefcore before driver registration. - Select the reference CPU from all online CPUs instead of assuming CPU 0. Scale by maximum frequency when available for both CPUs, or by effective highest performance otherwise. - Update the reference when a stronger CPU is initialized and rescale existing CPUs, including offline CPUs with retained policy data. - Move the public AMD P-state header to arch/x86/include/asm/amd/. - Defer HFI initialization to a late initcall for the CAS state check. - Link to v1: https://lore.kernel.org/all/20261114150310.1377654-1-Vishal.Badole@amd.com/ Krishnamoorthi M (1): platform/x86/amd: hfi: Stand down when amd-pstate CAS is active Vishal Badole (2): cpufreq: amd-pstate: Finalize prefcore before registration cpufreq: amd-pstate: Set asymmetric CPU capacity on hybrid platforms MAINTAINERS | 1 + arch/x86/include/asm/amd/amd-pstate.h | 16 +++ arch/x86/include/asm/topology.h | 6 + arch/x86/kernel/acpi/cppc.c | 4 +- drivers/cpufreq/amd-pstate.c | 191 ++++++++++++++++++++++++-- drivers/platform/x86/amd/hfi/hfi.c | 9 +- 6 files changed, 216 insertions(+), 11 deletions(-) create mode 100644 arch/x86/include/asm/amd/amd-pstate.h -- 2.34.1