Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
2#
3# Copyright (c) 2025 Valve Corporation.
4#
5---
6name: dev-energymodel
7
8doc: |
9 Energy model netlink interface to notify its changes.
10
11protocol: genetlink
12
13uapi-header: linux/dev_energymodel.h
14
15definitions:
16 -
17 type: flags
18 name: perf-state-flags
19 entries:
20 -
21 name: perf-state-inefficient
22 doc: >-
23 The performance state is inefficient. There is in this perf-domain,
24 another performance state with a higher frequency but a lower or
25 equal power cost.
26 -
27 type: flags
28 name: perf-domain-flags
29 entries:
30 -
31 name: perf-domain-microwatts
32 doc: >-
33 The power values are in micro-Watts or some other scale.
34 -
35 name: perf-domain-skip-inefficiencies
36 doc: >-
37 Skip inefficient states when estimating energy consumption.
38 -
39 name: perf-domain-artificial
40 doc: >-
41 The power values are artificial and might be created by platform
42 missing real power information.
43
44attribute-sets:
45 -
46 name: perf-domain
47 doc: >-
48 Information on a single performance domains.
49 attributes:
50 -
51 name: pad
52 type: pad
53 -
54 name: perf-domain-id
55 type: u32
56 doc: >-
57 A unique ID number for each performance domain.
58 -
59 name: flags
60 type: u64
61 doc: >-
62 Bitmask of performance domain flags.
63 enum: perf-domain-flags
64 -
65 name: cpus
66 type: u64
67 multi-attr: true
68 doc: >-
69 CPUs that belong to this performance domain.
70 -
71 name: perf-table
72 doc: >-
73 Performance states table.
74 attributes:
75 -
76 name: perf-domain-id
77 type: u32
78 doc: >-
79 A unique ID number for each performance domain.
80 -
81 name: perf-state
82 type: nest
83 nested-attributes: perf-state
84 multi-attr: true
85 -
86 name: perf-state
87 doc: >-
88 Performance state of a performance domain.
89 attributes:
90 -
91 name: pad
92 type: pad
93 -
94 name: performance
95 type: u64
96 doc: >-
97 CPU performance (capacity) at a given frequency.
98 -
99 name: frequency
100 type: u64
101 doc: >-
102 The frequency in KHz, for consistency with CPUFreq.
103 -
104 name: power
105 type: u64
106 doc: >-
107 The power consumed at this level (by 1 CPU or by a registered
108 device). It can be a total power: static and dynamic.
109 -
110 name: cost
111 type: u64
112 doc: >-
113 The cost coefficient associated with this level, used during energy
114 calculation. Equal to: power * max_frequency / frequency.
115 -
116 name: flags
117 type: u64
118 doc: >-
119 Bitmask of performance state flags.
120 enum: perf-state-flags
121
122operations:
123 list:
124 -
125 name: get-perf-domains
126 attribute-set: perf-domain
127 doc: Get the list of information for all performance domains.
128 do:
129 request:
130 attributes:
131 - perf-domain-id
132 reply:
133 attributes: &perf-domain-attrs
134 - pad
135 - perf-domain-id
136 - flags
137 - cpus
138 dump:
139 reply:
140 attributes: *perf-domain-attrs
141 -
142 name: get-perf-table
143 attribute-set: perf-table
144 doc: Get the energy model table of a performance domain.
145 do:
146 request:
147 attributes:
148 - perf-domain-id
149 reply:
150 attributes:
151 - perf-domain-id
152 - perf-state
153 -
154 name: perf-domain-created
155 doc: A performance domain is created.
156 notify: get-perf-table
157 mcgrp: event
158 -
159 name: perf-domain-updated
160 doc: A performance domain is updated.
161 notify: get-perf-table
162 mcgrp: event
163 -
164 name: perf-domain-deleted
165 doc: A performance domain is deleted.
166 attribute-set: perf-table
167 event:
168 attributes:
169 - perf-domain-id
170 mcgrp: event
171
172mcast-groups:
173 list:
174 -
175 name: event