# Family dev-energymodel netlink specification

_Peios Kernel / Internals / Netlink / specs_

> Protocol reference for the dev-energymodel Netlink family, generated from the Peios kernel specification.

<!-- SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) -->


<a id="rst-family-dev-energymodel-netlink-specification"></a>
<a id="rst-netlink-dev-energymodel"></a>

<!-- SPDX-License-Identifier: GPL-2.0 -->

<a id="rst-summary"></a>



## Summary



Energy model netlink interface to notify its changes.

<a id="rst-operations"></a>



## Operations

<a id="rst-get-perf-domains"></a>
<a id="rst-dev-energymodel-operation-get-perf-domains"></a>



### get-perf-domains



Get the list of information for all performance domains.

- **attribute-set**:

  [perf-domain](#rst-dev-energymodel-attribute-set-perf-domain)

- **do**:

  **request**

  - **attributes**:

    \[`perf-domain-id`\]

  **reply**

  - **attributes**:

    \[`pad`, `perf-domain-id`, `flags`, `cpus`\]

- **dump**:

  **reply**

  - **attributes**:

    \[`pad`, `perf-domain-id`, `flags`, `cpus`\]

<a id="rst-get-perf-table"></a>
<a id="rst-dev-energymodel-operation-get-perf-table"></a>



### get-perf-table



Get the energy model table of a performance domain.

- **attribute-set**:

  [perf-table](#rst-dev-energymodel-attribute-set-perf-table)

- **do**:

  **request**

  - **attributes**:

    \[`perf-domain-id`\]

  **reply**

  - **attributes**:

    \[`perf-domain-id`, `perf-state`\]

<a id="rst-perf-domain-created"></a>
<a id="rst-dev-energymodel-operation-perf-domain-created"></a>



### perf-domain-created



A performance domain is created.

- **notify**:

  get-perf-table

- **mcgrp**:

  event

<a id="rst-perf-domain-updated"></a>
<a id="rst-dev-energymodel-operation-perf-domain-updated"></a>



### perf-domain-updated



A performance domain is updated.

- **notify**:

  get-perf-table

- **mcgrp**:

  event

<a id="rst-perf-domain-deleted"></a>
<a id="rst-dev-energymodel-operation-perf-domain-deleted"></a>



### perf-domain-deleted



A performance domain is deleted.

- **attribute-set**:

  [perf-table](#rst-dev-energymodel-attribute-set-perf-table)

- **mcgrp**:

  event

- **event**:

  - **attributes**:

    \[`perf-domain-id`\]

<a id="rst-multicast-groups"></a>



## Multicast groups

- event


<a id="rst-definitions"></a>



## Definitions

<a id="rst-perf-state-flags"></a>
<a id="rst-dev-energymodel-definition-perf-state-flags"></a>



### perf-state-flags

- **type**:

  flags

- **entries**:

  - **perf-state-inefficient**:

    The performance state is inefficient. There is in this perf-domain, another performance state with a higher frequency but a lower or equal power cost.

<a id="rst-perf-domain-flags"></a>
<a id="rst-dev-energymodel-definition-perf-domain-flags"></a>



### perf-domain-flags

- **type**:

  flags

- **entries**:

  - **perf-domain-microwatts**:

    The power values are in micro-Watts or some other scale.

  - **perf-domain-skip-inefficiencies**:

    Skip inefficient states when estimating energy consumption.

  - **perf-domain-artificial**:

    The power values are artificial and might be created by platform missing real power information.

<a id="rst-attribute-sets"></a>



## Attribute sets

<a id="rst-perf-domain"></a>
<a id="rst-dev-energymodel-attribute-set-perf-domain"></a>



### perf-domain



Information on a single performance domains.

<a id="rst-pad-pad"></a>



#### pad (`pad`)

<a id="rst-perf-domain-id-u32"></a>



#### perf-domain-id (`u32`)

- **doc**:

  A unique ID number for each performance domain.

<a id="rst-flags-u64"></a>



#### flags (`u64`)

- **doc**:

  Bitmask of performance domain flags.

- **enum**:

  [perf-domain-flags](#rst-dev-energymodel-definition-perf-domain-flags)

<a id="rst-cpus-u64"></a>



#### cpus (`u64`)

- **multi-attr**:

  True

- **doc**:

  CPUs that belong to this performance domain.

<a id="rst-perf-table"></a>
<a id="rst-dev-energymodel-attribute-set-perf-table"></a>



### perf-table



Performance states table.

<a id="rst-perf-domain-id-u32-1"></a>



#### perf-domain-id (`u32`)

- **doc**:

  A unique ID number for each performance domain.

<a id="rst-perf-state-nest"></a>



#### perf-state (`nest`)

- **nested-attributes**:

  [perf-state](#rst-dev-energymodel-attribute-set-perf-state)

- **multi-attr**:

  True

<a id="rst-perf-state"></a>
<a id="rst-dev-energymodel-attribute-set-perf-state"></a>



### perf-state



Performance state of a performance domain.

<a id="rst-pad-pad-1"></a>



#### pad (`pad`)

<a id="rst-performance-u64"></a>



#### performance (`u64`)

- **doc**:

  CPU performance (capacity) at a given frequency.

<a id="rst-frequency-u64"></a>



#### frequency (`u64`)

- **doc**:

  The frequency in KHz, for consistency with CPUFreq.

<a id="rst-power-u64"></a>



#### power (`u64`)

- **doc**:

  The power consumed at this level (by 1 CPU or by a registered device). It can be a total power: static and dynamic.

<a id="rst-cost-u64"></a>



#### cost (`u64`)

- **doc**:

  The cost coefficient associated with this level, used during energy calculation. Equal to: power \* max\_frequency / frequency.

<a id="rst-flags-u64-1"></a>



#### flags (`u64`)

- **doc**:

  Bitmask of performance state flags.

- **enum**:

  [perf-state-flags](#rst-dev-energymodel-definition-perf-state-flags)
