thermal: netlink: Add a new event to notify CPU capabilities change
Add a new netlink event to notify change in CPU capabilities in terms of performance and efficiency. Firmware may change CPU capabilities as a result of thermal events in the system or to account for changes in the TDP (thermal design power) level. This notification type will allow user space to avoid running workloads on certain CPUs or proactively adjust power limits to avoid future events. The netlink message consists of a nested attribute (THERMAL_GENL_ATTR_CPU_CAPABILITY) with three attributes: * THERMAL_GENL_ATTR_CPU_CAPABILITY_ID (type u32): -- logical CPU number * THERMAL_GENL_ATTR_CPU_CAPABILITY_PERFORMANCE (type u32): -- Scaled performance from 0-1023 * THERMAL_GENL_ATTR_CPU_CAPABILITY_EFFICIENCY (type u32): -- Scaled efficiency from 0-1023 Reviewed-by: Len Brown <len.brown@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
ab09b0744a
commit
e4b1eb24ce
3 changed files with 72 additions and 1 deletions
|
|
@ -44,7 +44,10 @@ enum thermal_genl_attr {
|
|||
THERMAL_GENL_ATTR_CDEV_MAX_STATE,
|
||||
THERMAL_GENL_ATTR_CDEV_NAME,
|
||||
THERMAL_GENL_ATTR_GOV_NAME,
|
||||
|
||||
THERMAL_GENL_ATTR_CPU_CAPABILITY,
|
||||
THERMAL_GENL_ATTR_CPU_CAPABILITY_ID,
|
||||
THERMAL_GENL_ATTR_CPU_CAPABILITY_PERFORMANCE,
|
||||
THERMAL_GENL_ATTR_CPU_CAPABILITY_EFFICIENCY,
|
||||
__THERMAL_GENL_ATTR_MAX,
|
||||
};
|
||||
#define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1)
|
||||
|
|
@ -71,6 +74,7 @@ enum thermal_genl_event {
|
|||
THERMAL_GENL_EVENT_CDEV_DELETE, /* Cdev unbound */
|
||||
THERMAL_GENL_EVENT_CDEV_STATE_UPDATE, /* Cdev state updated */
|
||||
THERMAL_GENL_EVENT_TZ_GOV_CHANGE, /* Governor policy changed */
|
||||
THERMAL_GENL_EVENT_CPU_CAPABILITY_CHANGE, /* CPU capability changed */
|
||||
__THERMAL_GENL_EVENT_MAX,
|
||||
};
|
||||
#define THERMAL_GENL_EVENT_MAX (__THERMAL_GENL_EVENT_MAX - 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue