Message ID | 20240720165030.246294-1-sivaprasad.tummala@amd.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ED9C445665; Sat, 20 Jul 2024 18:51:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6BB24027E; Sat, 20 Jul 2024 18:51:02 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2080.outbound.protection.outlook.com [40.107.92.80]) by mails.dpdk.org (Postfix) with ESMTP id DEE2D40269 for <dev@dpdk.org>; Sat, 20 Jul 2024 18:51:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=t00mZ+78QO8T6ZtDEmyRbWDjRN7mWTkd4sv7vuKzeg4RFDhd14Uu9dFP0z+bkaqLHOH1sxpfvKiCKXs+x6ioymw2g7PEO0dGEKo6Yxw+t2S2PfFGdkpvOYy1DeGmgkLqMlJYpmj3sUrQNjJO277W6D8mwOrtiCH7NHnAwt8/enG5q9Eb3tdRZ0MjtiTZuLfPeYszXyKYTdntgT+rPVyB/LdJajbAtWwASzbXAX7rZCKJMSc/RLdbaPx3i9iO0ttd0PQDGWcCs9u5ZMS8MS8a5GRouwhdwrlqP1iLEAN7SRLFU6AKPLtGZDP6y9pk4SnjDSW2OL2GLA6Axt+c/ivi+Q== 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=48ufViZtV7IcRVG6D67wy7XxgxBBZM/0/TKXalftA7M=; b=eZ7sQTP0W3aHAonGnNxl6pEwL0KnDRnW4c7b3kceZd4ayV8/JmiqU9cj4AozD9M4aB92xwjrbWMVHde4QBoltZtp3RGKj8Z5E2wU4tI5hSKkqmIl/gKywQiifAPc4ETWwVI7ZWS9sarRmwzFaVI4tPmW3O6v9hT8cIOPxbzK1uaIQz4okIq21cJCRCcN21bl/2LWbF7GpWVAMHoQ67NKRDbe9qWjcfLLQaQNO9J05eyPVypoo8z8rBfFBUYD1bHjcfBegekphUmzaq1RbbvSI78vRP8vmjpoXPfKSU/k/9wQgvX1rw1d9ULgnodg9IRdzgz8HWVAQqfwVRWRay7FKw== 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=48ufViZtV7IcRVG6D67wy7XxgxBBZM/0/TKXalftA7M=; b=ECi5yM73v+VBxrfPsDq74fuTsUj/uJatuiKCRtbwrJDOHa0EG8sA1Eb4Plmh+nEHw6u6gDkhq6J4zWGS1HxdgZkhjGvtRH1+aoyu8RdyuZZbX9Z1/9uIy4MAcIdR7Vjz3RKGkYZKDbGmWtDtj36qDKqn5H3baoYYkaYHsoKtJAE= Received: from MN2PR11CA0020.namprd11.prod.outlook.com (2603:10b6:208:23b::25) by SJ2PR12MB8831.namprd12.prod.outlook.com (2603:10b6:a03:4d0::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29; Sat, 20 Jul 2024 16:50:55 +0000 Received: from BL6PEPF0001AB56.namprd02.prod.outlook.com (2603:10b6:208:23b:cafe::9f) by MN2PR11CA0020.outlook.office365.com (2603:10b6:208:23b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16 via Frontend Transport; Sat, 20 Jul 2024 16:50:55 +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 BL6PEPF0001AB56.mail.protection.outlook.com (10.167.241.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.11 via Frontend Transport; Sat, 20 Jul 2024 16:50:54 +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; Sat, 20 Jul 2024 11:50:52 -0500 From: Sivaprasad Tummala <sivaprasad.tummala@amd.com> To: <david.hunt@intel.com>, <anatoly.burakov@intel.com>, <jerinj@marvell.com>, <lihuisong@huawei.com>, <david.marchand@redhat.com>, <ferruh.yigit@amd.com>, <konstantin.ananyev@huawei.com> CC: <dev@dpdk.org> Subject: [PATCH v1 0/4] power: refactor power management library Date: Sat, 20 Jul 2024 16:50:25 +0000 Message-ID: <20240720165030.246294-1-sivaprasad.tummala@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240220153326.6236-1-sivaprasad.tummala@amd.com> References: <20240220153326.6236-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF0001AB56:EE_|SJ2PR12MB8831:EE_ X-MS-Office365-Filtering-Correlation-Id: 5da9ec89-0f49-47e4-f4bb-08dca8dc1f24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: CI0Juc156u3ssyCZR9enkxzEn3QRL/+ITIKDti3s2v4dRLi/bj8gj4jmDUzBQxNxJBwOiQbVSZJiJMY+IKTVi8gnCiJvEEmfAqXoRRw0CBs2fuP6yFma/utMu6TLVmAWesCdSc82KCX1kWwaNFlSz5VZ+N3Yod5yqu18tLAMGgiBgWWltS5B3DvyCSQjgJVhZzUox7lFFN/7x1OnRrU+17a+ALS4/kGutcw4a5YRlZgiMDJDA3jtpjTyvfKyPWWSU7wWLEA3a1wOFES4rJJUq7ZCt1ngTmadXcTwC77XyOsN5NOLM3hUinXseIKISYXFL9lt4sp1NRCYBVIZ8JbWR9YhU6jOvB4vlutFVXTpwZzXVJviWDUiCd1Fxf8v6udb/YR20SW/E4xhmsyA5UUfy1uXgy4tKGffHFBNXRAqsWCqNhRuG7mWQxxk4jHE90kYGnAUQaXz0VYMREyyPJruo8DwRl9ur0JjApHNRIrvL2nDFDXQK+2SZ63EXdwiUFEM8ANZ6Ci2E6dRTX3OsvnALxCgQzxqzuddbY0mDwwVISOm8WDGKShHrpkOfducE2EAkR9e828v7Mby3y7Ke6omldvoLTDFw5hbfNOal1qEgDI+br1cKPnj4fYnZVeNcbl8Pixtm6TYA0K6ML/DrbhQiVDc28qwpnXaAObq4PBixvbeQ8SfBPBgMJL59ZOzu5EGuL9FZBw+7McHbObqX3Qep1NqRYQ9Vm+XF+He0gia2g1CsL25UENkvYQxMqOg4ZFhYeqE19qdBxX2ApWONk5ziG3SAs3vnyjXqFTybV6RF3gAPraZ7rIfSL618P0riFr3j9UVGuPJ45BdRw2i/qrzxeMSml/5OggeCDHwxjkDRTvMpA/SNhzHu32tYy0EmgLsMWKgIRAy8kO62OFJaewGtNvA1MscrVmfmHgsVmOlv/+yYm/KyGwCdQ79omHiRYCvlO3TNV9/iCIE6pWBecMNPpzge/tjKoeBdxZavkNgJlMLGXZ/+WBIhc5U/BcDa5kHYLwHlCjQAzHBjirfzvKnUXp6nSJjJAzgtOh76zs9KTSV5yIrqAktNS4cTFi+l7xECaY2IfC6Hbi6YQ4t6WhE8suG9fylV0mdqARcl4E1IAyhLan1FaHvkRwZ0wGwePLITs0gN50Gia/ac2drbq0Zm6Y2TQlQaU3wQpqdDWvhE6d839PwVcBbMiSYMp5tMAwMBL4XC/rCFojvfO250D/x4mgGvg96+PGR4Ghc2slCy8zSFUWVMteNFWNlp8nFRC98s9BGt45qx/7YyKGDTaae7itjsc1xvB8ImHfSM0+lUohKcUJEI0n8qEZ1P3y/PYG+q2B8hN9qf1r1NkC8EhrecsV/70xIOm6u3ot9RusMRjkPb3jMXFyORO8YtRBvXPGxlJQU5qd0IR1Rpg7nwJJ8fKMFgWd61N4zoWZJaQOi2rUKJxfln/gnR/ma1gyt5WK+ 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)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2024 16:50:54.7773 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5da9ec89-0f49-47e4-f4bb-08dca8dc1f24 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: BL6PEPF0001AB56.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8831 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
power: refactor power management library
|
|
Message
Sivaprasad Tummala
July 20, 2024, 4:50 p.m. UTC
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 (4): power: refactor core power management library power: refactor uncore power management library test/power: removed function pointer validations power/amd_uncore: uncore power management support for AMD EPYC processors app/test/test_power.c | 95 ------ app/test/test_power_cpufreq.c | 52 --- app/test/test_power_kvm_vm.c | 36 -- 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 | 8 +- drivers/power/amd_pstate/meson.build | 10 + drivers/power/amd_uncore/amd_uncore.c | 321 ++++++++++++++++++ drivers/power/amd_uncore/amd_uncore.h | 226 ++++++++++++ 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 | 8 +- drivers/power/intel_uncore/meson.build | 7 + .../power/kvm_vm}/guest_channel.c | 0 .../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 | 16 + drivers/power/meson.build | 14 + drivers/power/pstate/meson.build | 10 + .../power/pstate/pstate_cpufreq.c | 22 +- .../power/pstate/pstate_cpufreq.h | 6 +- lib/power/meson.build | 9 +- lib/power/power_common.c | 2 +- lib/power/power_common.h | 16 +- lib/power/rte_power.c | 287 ++++++---------- lib/power/rte_power.h | 139 +++++--- lib/power/rte_power_core_ops.h | 208 ++++++++++++ lib/power/rte_power_uncore.c | 206 +++++------ lib/power/rte_power_uncore.h | 91 ++--- lib/power/rte_power_uncore_ops.h | 239 +++++++++++++ lib/power/version.map | 15 + 38 files changed, 1591 insertions(+), 621 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 (97%) 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 (100%) 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/rte_power_core_ops.h create mode 100644 lib/power/rte_power_uncore_ops.h
Comments
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 (4): power: refactor core power management library power: refactor uncore power management library test/power: removed function pointer validations power/amd_uncore: uncore power management support for AMD EPYC processors app/test/test_power.c | 95 ------ app/test/test_power_cpufreq.c | 52 --- app/test/test_power_kvm_vm.c | 36 -- 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 | 8 +- drivers/power/amd_pstate/meson.build | 10 + drivers/power/amd_uncore/amd_uncore.c | 321 ++++++++++++++++++ drivers/power/amd_uncore/amd_uncore.h | 226 ++++++++++++ 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 | 8 +- drivers/power/intel_uncore/meson.build | 7 + .../power/kvm_vm}/guest_channel.c | 0 .../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 | 16 + drivers/power/meson.build | 14 + drivers/power/pstate/meson.build | 10 + .../power/pstate/pstate_cpufreq.c | 22 +- .../power/pstate/pstate_cpufreq.h | 6 +- lib/power/meson.build | 9 +- lib/power/power_common.c | 2 +- lib/power/power_common.h | 16 +- lib/power/rte_power.c | 287 ++++++---------- lib/power/rte_power.h | 139 +++++--- lib/power/rte_power_core_ops.h | 208 ++++++++++++ lib/power/rte_power_uncore.c | 206 +++++------ lib/power/rte_power_uncore.h | 91 ++--- lib/power/rte_power_uncore_ops.h | 239 +++++++++++++ lib/power/version.map | 15 + 38 files changed, 1591 insertions(+), 621 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 (97%) 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 (100%) 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/rte_power_core_ops.h create mode 100644 lib/power/rte_power_uncore_ops.h