]> Gentwo Git Trees - linux/.git/commit
PM: EM: Assign a unique ID when creating a performance domain
authorChangwoo Min <changwoo@igalia.com>
Mon, 20 Oct 2025 22:09:05 +0000 (07:09 +0900)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 22 Oct 2025 19:44:37 +0000 (21:44 +0200)
commitcbe5aeedecc72314c3a8fd0d41d9b270f576aee1
treea117759a2c8c1082ab89d8204ddbe5c38023beb7
parent211ddde0823f1442e4ad052a2f30f050145ccada
PM: EM: Assign a unique ID when creating a performance domain

It is necessary to refer to a specific performance domain from a
userspace. For example, the energy model of a particular performance
domain is updated.

To this end, assign a unique ID to each performance domain to address it,
and manage them in a global linked list to look up a specific one by
matching ID. IDA is used for ID assignment, and the mutex is used to
protect the global list from concurrent access.

Note that the mutex (em_pd_list_mutex) is not supposed to hold while
holding em_pd_mutex to avoid ABBA deadlock.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20251020220914.320832-2-changwoo@igalia.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/linux/energy_model.h
kernel/power/energy_model.c