From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E474345BA5; Tue, 22 Oct 2024 20:42:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA168402D5; Tue, 22 Oct 2024 20:42:01 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2085.outbound.protection.outlook.com [40.107.236.85]) by mails.dpdk.org (Postfix) with ESMTP id EF1254029B for ; Tue, 22 Oct 2024 20:41:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=J48Wqal+yIwo+sf9QwFsAgpM9ksbu+Q450QSSTCOk8+TCYmLDH4KTRDGbYeuUHFrUq0FOxOYhQzStBFzEbqNSn/1zubOrqawOZ0owWxCOWrLHW5XKzzmWuK/F9YlSWl5ULgFElsIGwr3OIqEZQSdckV0/KLy65fNKF3mJqZydYZrg6ipUL2WNDkCXLZp5r0cxpPvQtRHBgRnoc7BaSwe0re/SuX+kzR9KAWlrvwoXHnWoujHjiXuO71b9B0Iha9UYehOXwCJc82Y0KVWj3woAhyggvkDXgxiZW/yk2Nc6kkkzOre4x9Nix1IuoX0sC4zflJn08tAvcnpmPUl1dG9cA== 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=jB1n7YhnSp+v7r1dkCrb9FYaZB4fYRneoO8DMmoB070=; b=hocnYGcZP8hq/tU012K8LawISDK5npXRxZyiMBn5iTG3kWXOkmDnlZDiO1MiXVr1A672g5ffF4CM8dxVhHYjTbRdBhYiNgtFUnML3j90kk+kO3a6jcTdmJzS3AoCR4kUbIDXkmXIHuy/SQLiUlb8HVoHBAa4IdVBwWuuWIXh/Q4OQTfHvx2zVmq5rqq5pVOYp0s0FksrupuBBrv7nwpPA0VN3NB08Pwe7+1LSMtQkPWNbqPKPNlas8EwGcMiNWFJlsrpdo+QGaZ8C1QMMEh89XcfhGtg0NaOrHiYrKNJBYoRGdTPOJ/e5frL9Pcb7M21cCRto3WmKGpWKJQCf0Rvvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com 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=jB1n7YhnSp+v7r1dkCrb9FYaZB4fYRneoO8DMmoB070=; b=kfj9RUCv04OjIyjeur0CLxixilslgV+QBhfintPhmQmOnvHPHKemaRF7phWogeiF07/9hrih7QD3D0QIL8VxLL2fInJ8pgcm+4vBUJ4MNG2HBOFU9SYDqoBmBYea8YshGJk6oW/djbLeRZM4pZfZ6VgIL12wuyYACi7NjdwHCq8= Received: from PH7PR03CA0025.namprd03.prod.outlook.com (2603:10b6:510:339::17) by MW4PR12MB7262.namprd12.prod.outlook.com (2603:10b6:303:228::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Tue, 22 Oct 2024 18:41:56 +0000 Received: from CY4PEPF0000E9D2.namprd03.prod.outlook.com (2603:10b6:510:339:cafe::b3) by PH7PR03CA0025.outlook.office365.com (2603:10b6:510:339::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16 via Frontend Transport; Tue, 22 Oct 2024 18:41:56 +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 CY4PEPF0000E9D2.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Tue, 22 Oct 2024 18:41:55 +0000 Received: from jfw9ny3-os.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, 22 Oct 2024 13:41:51 -0500 From: Sivaprasad Tummala To: , , , , , , , , CC: Subject: [PATCH v8 0/6] power: refactor power management library Date: Tue, 22 Oct 2024 18:41:26 +0000 Message-ID: <20241022184133.700367-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241021040724.3325876-1-sivaprasad.tummala@amd.com> References: <20241021040724.3325876-1-sivaprasad.tummala@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] 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: CY4PEPF0000E9D2:EE_|MW4PR12MB7262:EE_ X-MS-Office365-Filtering-Correlation-Id: 616cc0fd-67f3-4717-f469-08dcf2c9344f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microso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cfRdM0tKz/3cIbY6EKE4OaWDz+LiC6spXkrK+rM?= =?us-ascii?Q?RQ+5dFgni76w1ARtz1wkJzfX5D3VvodAgxziYUQlcd5HxOfuXXQDQJczy4Mg?= =?us-ascii?Q?JzEDjezqZp69/JV6hn3IYDqJhr63wuxioY+Urr4NJ4PG3YQjnjtafKms3KD1?= =?us-ascii?Q?7EyZAXP67C89z/tx1X6WVm3BCEXgJH0/6YoXLfRnz9JuLHuJwq7BuPn2LpoE?= =?us-ascii?Q?zXAC9aZdACeccC/Ep/PbS0kM8152mFFzH2WxUax4TxGPvsAEeD5iacsRXvIH?= =?us-ascii?Q?GVdUEL8WTzZH7DFVRhjmyy1AOQdyxgt03v3sfixr4Lxulq+EsX2tTrUUeuEt?= =?us-ascii?Q?HzAb0CkQdJ0SnQ2VPAxncNuxtxBK3Ib/7WP3aX7SmLUqI7kBCljI0gJ0tpXn?= =?us-ascii?Q?Teco4xpywrVfKGSfbUDNoqS9uzyB8yELgMdFoP8wfjfWjFNiPhn4MVwa2LA4?= =?us-ascii?Q?pFC6f6JmCYQVl0GvizQaB2L8Ub/v7PAmbvvrGhcpVM7Veenc0wD+5mc6jTUz?= =?us-ascii?Q?AiJanCcYZOW/1wk9HN4AtdvjJ5T4qEGx8r2b1GZdOxPbSp2IJg=3D=3D?= 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:(13230040)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 18:41:55.8052 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 616cc0fd-67f3-4717-f469-08dcf2c9344f 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: CY4PEPF0000E9D2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7262 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patchset refactors the power management library, addressing both core and uncore power management. The primary changes involve the creation of dedicated directories for each driver within 'drivers/power/core/*' and 'drivers/power/uncore/*'. This refactor significantly improves code organization, enhances clarity, and boosts maintainability. It lays the foundation for more focused development on individual drivers and facilitates seamless integration of future enhancements, particularly the AMD uncore driver. Furthermore, this effort aims to streamline code maintenance by consolidating common functions for cpufreq and cppc across various core drivers, thus reducing code duplication. Sivaprasad Tummala (6): power: refactor core power management library power: refactor uncore power management library test/power: removed function pointer validations drivers/power: uncore support for AMD EPYC processors maintainers: update for drivers/power power: rename library sources for cpu frequency management MAINTAINERS | 1 + app/test/test_power.c | 97 +----- app/test/test_power_cpufreq.c | 54 +-- app/test/test_power_kvm_vm.c | 38 +- drivers/meson.build | 1 + .../power/acpi/acpi_cpufreq.c | 22 +- .../power/acpi/acpi_cpufreq.h | 6 +- drivers/power/acpi/meson.build | 10 + .../power/amd_pstate/amd_pstate_cpufreq.c | 24 +- .../power/amd_pstate/amd_pstate_cpufreq.h | 10 +- drivers/power/amd_pstate/meson.build | 10 + drivers/power/amd_uncore/amd_uncore.c | 329 ++++++++++++++++++ drivers/power/amd_uncore/amd_uncore.h | 225 ++++++++++++ drivers/power/amd_uncore/meson.build | 20 ++ .../power/cppc/cppc_cpufreq.c | 22 +- .../power/cppc/cppc_cpufreq.h | 8 +- drivers/power/cppc/meson.build | 10 + .../power/intel_uncore/intel_uncore.c | 18 +- .../power/intel_uncore/intel_uncore.h | 9 +- drivers/power/intel_uncore/meson.build | 6 + .../power/kvm_vm}/guest_channel.c | 2 +- .../power/kvm_vm}/guest_channel.h | 0 .../power/kvm_vm/kvm_vm.c | 22 +- .../power/kvm_vm/kvm_vm.h | 6 +- drivers/power/kvm_vm/meson.build | 14 + drivers/power/meson.build | 14 + drivers/power/pstate/meson.build | 10 + .../power/pstate/pstate_cpufreq.c | 22 +- .../power/pstate/pstate_cpufreq.h | 6 +- examples/distributor/main.c | 2 +- examples/l3fwd-power/main.c | 14 +- examples/l3fwd-power/perf_core.c | 2 +- examples/vm_power_manager/channel_monitor.c | 2 +- examples/vm_power_manager/channel_monitor.h | 2 +- examples/vm_power_manager/guest_cli/main.c | 2 +- .../guest_cli/vm_power_cli_guest.c | 2 +- examples/vm_power_manager/power_manager.c | 2 +- lib/power/meson.build | 13 +- lib/power/power_common.c | 2 +- lib/power/power_common.h | 18 +- lib/power/power_cpufreq.h | 191 ++++++++++ lib/power/power_uncore_ops.h | 244 +++++++++++++ lib/power/rte_power.c | 257 -------------- lib/power/rte_power_cpufreq.c | 230 ++++++++++++ .../{rte_power.h => rte_power_cpufreq.h} | 120 ++++--- lib/power/rte_power_pmd_mgmt.h | 2 +- lib/power/rte_power_uncore.c | 256 +++++++------- lib/power/rte_power_uncore.h | 61 ++-- lib/power/version.map | 15 + 49 files changed, 1746 insertions(+), 707 deletions(-) rename lib/power/power_acpi_cpufreq.c => drivers/power/acpi/acpi_cpufreq.c (95%) rename lib/power/power_acpi_cpufreq.h => drivers/power/acpi/acpi_cpufreq.h (98%) create mode 100644 drivers/power/acpi/meson.build rename lib/power/power_amd_pstate_cpufreq.c => drivers/power/amd_pstate/amd_pstate_cpufreq.c (95%) rename lib/power/power_amd_pstate_cpufreq.h => drivers/power/amd_pstate/amd_pstate_cpufreq.h (96%) create mode 100644 drivers/power/amd_pstate/meson.build create mode 100644 drivers/power/amd_uncore/amd_uncore.c create mode 100644 drivers/power/amd_uncore/amd_uncore.h create mode 100644 drivers/power/amd_uncore/meson.build rename lib/power/power_cppc_cpufreq.c => drivers/power/cppc/cppc_cpufreq.c (95%) rename lib/power/power_cppc_cpufreq.h => drivers/power/cppc/cppc_cpufreq.h (97%) create mode 100644 drivers/power/cppc/meson.build rename lib/power/power_intel_uncore.c => drivers/power/intel_uncore/intel_uncore.c (95%) rename lib/power/power_intel_uncore.h => drivers/power/intel_uncore/intel_uncore.h (97%) create mode 100644 drivers/power/intel_uncore/meson.build rename {lib/power => drivers/power/kvm_vm}/guest_channel.c (99%) rename {lib/power => drivers/power/kvm_vm}/guest_channel.h (100%) rename lib/power/power_kvm_vm.c => drivers/power/kvm_vm/kvm_vm.c (82%) rename lib/power/power_kvm_vm.h => drivers/power/kvm_vm/kvm_vm.h (98%) create mode 100644 drivers/power/kvm_vm/meson.build create mode 100644 drivers/power/meson.build create mode 100644 drivers/power/pstate/meson.build rename lib/power/power_pstate_cpufreq.c => drivers/power/pstate/pstate_cpufreq.c (96%) rename lib/power/power_pstate_cpufreq.h => drivers/power/pstate/pstate_cpufreq.h (98%) create mode 100644 lib/power/power_cpufreq.h create mode 100644 lib/power/power_uncore_ops.h delete mode 100644 lib/power/rte_power.c create mode 100644 lib/power/rte_power_cpufreq.c rename lib/power/{rte_power.h => rte_power_cpufreq.h} (73%) -- 2.34.1