[PATCH v2 1/2] power: fix power library with --lcores
Thomas Monjalon
thomas at monjalon.net
Fri Oct 18 12:15:57 CEST 2024
18/10/2024 05:34, Sivaprasad Tummala:
> This commit fixes an issue in the power library
> related to using lcores mapped to different
> physical cores (--lcores option in EAL).
>
> Previously, the power library incorrectly accessed
> CPU sysfs attributes for power management, treating
> lcore IDs as CPU IDs.
> e.g. with --lcores '1 at 128', lcore_id '1' was interpreted
> as CPU_id instead of '128'.
>
> This patch corrects the cpu_id based on lcore and CPU
> mappings. It also constraints power management support
> for lcores mapped to multiple physical cores/threads.
>
> When multiple lcores are mapped to the same physical core,
> invoking frequency scaling APIs on any lcore will apply the
> changes effectively.
>
> v2:
> - renamed check_lcore_and_set_cpu to power_get_lcore_mapped_cpu_id
>
> Signed-off-by: Sivaprasad Tummala <sivaprasad.tummala at amd.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev at huawei.com>
> Acked-by: Huisong Li <lihuisong at huawei.com>
Applied with style edits and Fixes/Cc, thanks.
More information about the dev
mailing list