.../netlink/specs/dev-energymodel.yaml | 188 ++++++++++++++++ Documentation/netlink/specs/em.yaml | 113 ---------- MAINTAINERS | 8 +- include/uapi/linux/dev_energymodel.h | 90 ++++++++ include/uapi/linux/energy_model.h | 63 ------ kernel/power/em_netlink.c | 207 ++++++++++++------ kernel/power/em_netlink_autogen.c | 58 +++-- kernel/power/em_netlink_autogen.h | 22 +- 8 files changed, 472 insertions(+), 277 deletions(-) create mode 100644 Documentation/netlink/specs/dev-energymodel.yaml delete mode 100644 Documentation/netlink/specs/em.yaml create mode 100644 include/uapi/linux/dev_energymodel.h delete mode 100644 include/uapi/linux/energy_model.h
This patch set addresses all the concerns raised at [1] to make the EM YNL spec
clearer. It includes the following changes:
- Fix the lint errors (1/4).
- Rename em.yaml to dev-energymodel.yaml (2/4). “dev-energymodel” was used
instead of “device-energy-model”, which was originally proposed [2], because
the netlink protocol name cannot exceed GENL_NAMSIZ(16). In addition, docs
strings and flags attributes were added.
- Change cpus' type from string to u64 array of CPU ids (3/4).
- Add dump to get-perf-domains in the EM YNL spec (4/4). A user can fetch
either information about a specific performance domain with do or information
about all performance domains with dump.
This can be tested using the tool, tools/net/ynl/pyynl/cli.py, for example,
with the following commands:
$> tools/net/ynl/pyynl/cli.py \
--spec Documentation/netlink/specs/dev-energymodel.yaml \
--dump get-perf-domains
$> tools/net/ynl/pyynl/cli.py \
--spec Documentation/netlink/specs/dev-energymodel.yaml \
--do get-perf-domains --json '{"perf-domain-id": 0}'
$> tools/net/ynl/pyynl/cli.py \
--spec Documentation/netlink/specs/dev-energymodel.yaml \
--do get-perf-table --json '{"perf-domain-id": 0}'
$> tools/net/ynl/pyynl/cli.py \
--spec Documentation/netlink/specs/dev-energymodel.yaml \
--subscribe event --sleep 10
[1] https://lore.kernel.org/lkml/CAD4GDZy-aeWsiY=-ATr+Y4PzhMX71DFd_mmdMk4rxn3YG8U5GA@mail.gmail.com/
[2] https://lore.kernel.org/lkml/CAJZ5v0gpYQwC=1piaX-PNoyeoYJ7uw=DtAGdTVEXAsi4bnSdbA@mail.gmail.com/
Changwoo Min (4):
PM: EM: Fix yamllint warnings in the EM YNL spec
PM: EM: Rename em.yaml to dev-energymodel.yaml
PM: EM: Change cpus' type from string to u64 array in the EM YNL spec
PM: EM: Add dump to get-perf-domains in the EM YNL spec
.../netlink/specs/dev-energymodel.yaml | 188 ++++++++++++++++
Documentation/netlink/specs/em.yaml | 113 ----------
MAINTAINERS | 8 +-
include/uapi/linux/dev_energymodel.h | 90 ++++++++
include/uapi/linux/energy_model.h | 63 ------
kernel/power/em_netlink.c | 207 ++++++++++++------
kernel/power/em_netlink_autogen.c | 58 +++--
kernel/power/em_netlink_autogen.h | 22 +-
8 files changed, 472 insertions(+), 277 deletions(-)
create mode 100644 Documentation/netlink/specs/dev-energymodel.yaml
delete mode 100644 Documentation/netlink/specs/em.yaml
create mode 100644 include/uapi/linux/dev_energymodel.h
delete mode 100644 include/uapi/linux/energy_model.h
--
2.52.0
Hi Changwoo,
On 12/25/25 04:01, Changwoo Min wrote:
> This patch set addresses all the concerns raised at [1] to make the EM YNL spec
> clearer. It includes the following changes:
>
> - Fix the lint errors (1/4).
> - Rename em.yaml to dev-energymodel.yaml (2/4). “dev-energymodel” was used
> instead of “device-energy-model”, which was originally proposed [2], because
> the netlink protocol name cannot exceed GENL_NAMSIZ(16). In addition, docs
> strings and flags attributes were added.
> - Change cpus' type from string to u64 array of CPU ids (3/4).
> - Add dump to get-perf-domains in the EM YNL spec (4/4). A user can fetch
> either information about a specific performance domain with do or information
> about all performance domains with dump.
>
> This can be tested using the tool, tools/net/ynl/pyynl/cli.py, for example,
> with the following commands:
>
> $> tools/net/ynl/pyynl/cli.py \
> --spec Documentation/netlink/specs/dev-energymodel.yaml \
> --dump get-perf-domains
> $> tools/net/ynl/pyynl/cli.py \
> --spec Documentation/netlink/specs/dev-energymodel.yaml \
> --do get-perf-domains --json '{"perf-domain-id": 0}'
> $> tools/net/ynl/pyynl/cli.py \
> --spec Documentation/netlink/specs/dev-energymodel.yaml \
> --do get-perf-table --json '{"perf-domain-id": 0}'
> $> tools/net/ynl/pyynl/cli.py \
> --spec Documentation/netlink/specs/dev-energymodel.yaml \
> --subscribe event --sleep 10
>
> [1] https://lore.kernel.org/lkml/CAD4GDZy-aeWsiY=-ATr+Y4PzhMX71DFd_mmdMk4rxn3YG8U5GA@mail.gmail.com/
> [2] https://lore.kernel.org/lkml/CAJZ5v0gpYQwC=1piaX-PNoyeoYJ7uw=DtAGdTVEXAsi4bnSdbA@mail.gmail.com/
My apologies, I've missed those conversations (not the best season).
So what would be the procedure here for the review?
Could Folks from netlink help here?
I will do my bit for the EM related stuff (to double-check them).
Regards,
Lukasz
On Tue, Dec 30, 2025 at 10:44 AM Lukasz Luba <lukasz.luba@arm.com> wrote:
>
> Hi Changwoo,
>
> On 12/25/25 04:01, Changwoo Min wrote:
> > This patch set addresses all the concerns raised at [1] to make the EM YNL spec
> > clearer. It includes the following changes:
> >
> > - Fix the lint errors (1/4).
> > - Rename em.yaml to dev-energymodel.yaml (2/4). “dev-energymodel” was used
> > instead of “device-energy-model”, which was originally proposed [2], because
> > the netlink protocol name cannot exceed GENL_NAMSIZ(16). In addition, docs
> > strings and flags attributes were added.
> > - Change cpus' type from string to u64 array of CPU ids (3/4).
> > - Add dump to get-perf-domains in the EM YNL spec (4/4). A user can fetch
> > either information about a specific performance domain with do or information
> > about all performance domains with dump.
> >
> > This can be tested using the tool, tools/net/ynl/pyynl/cli.py, for example,
> > with the following commands:
> >
> > $> tools/net/ynl/pyynl/cli.py \
> > --spec Documentation/netlink/specs/dev-energymodel.yaml \
> > --dump get-perf-domains
> > $> tools/net/ynl/pyynl/cli.py \
> > --spec Documentation/netlink/specs/dev-energymodel.yaml \
> > --do get-perf-domains --json '{"perf-domain-id": 0}'
> > $> tools/net/ynl/pyynl/cli.py \
> > --spec Documentation/netlink/specs/dev-energymodel.yaml \
> > --do get-perf-table --json '{"perf-domain-id": 0}'
> > $> tools/net/ynl/pyynl/cli.py \
> > --spec Documentation/netlink/specs/dev-energymodel.yaml \
> > --subscribe event --sleep 10
> >
> > [1] https://lore.kernel.org/lkml/CAD4GDZy-aeWsiY=-ATr+Y4PzhMX71DFd_mmdMk4rxn3YG8U5GA@mail.gmail.com/
> > [2] https://lore.kernel.org/lkml/CAJZ5v0gpYQwC=1piaX-PNoyeoYJ7uw=DtAGdTVEXAsi4bnSdbA@mail.gmail.com/
>
> My apologies, I've missed those conversations (not the best season).
>
> So what would be the procedure here for the review?
> Could Folks from netlink help here?
>
> I will do my bit for the EM related stuff (to double-check them).
I think that it'll be good to have this in 6.19 to avoid making a
major release with an outdated EM YNL spec and I see that the review
on the net side is complete, so are there any concerns about this?
Hi Rafael,
On 1/5/26 18:22, Rafael J. Wysocki wrote:
> On Tue, Dec 30, 2025 at 10:44 AM Lukasz Luba <lukasz.luba@arm.com> wrote:
>>
>> Hi Changwoo,
>>
>> On 12/25/25 04:01, Changwoo Min wrote:
>>> This patch set addresses all the concerns raised at [1] to make the EM YNL spec
>>> clearer. It includes the following changes:
>>>
>>> - Fix the lint errors (1/4).
>>> - Rename em.yaml to dev-energymodel.yaml (2/4). “dev-energymodel” was used
>>> instead of “device-energy-model”, which was originally proposed [2], because
>>> the netlink protocol name cannot exceed GENL_NAMSIZ(16). In addition, docs
>>> strings and flags attributes were added.
>>> - Change cpus' type from string to u64 array of CPU ids (3/4).
>>> - Add dump to get-perf-domains in the EM YNL spec (4/4). A user can fetch
>>> either information about a specific performance domain with do or information
>>> about all performance domains with dump.
>>>
>>> This can be tested using the tool, tools/net/ynl/pyynl/cli.py, for example,
>>> with the following commands:
>>>
>>> $> tools/net/ynl/pyynl/cli.py \
>>> --spec Documentation/netlink/specs/dev-energymodel.yaml \
>>> --dump get-perf-domains
>>> $> tools/net/ynl/pyynl/cli.py \
>>> --spec Documentation/netlink/specs/dev-energymodel.yaml \
>>> --do get-perf-domains --json '{"perf-domain-id": 0}'
>>> $> tools/net/ynl/pyynl/cli.py \
>>> --spec Documentation/netlink/specs/dev-energymodel.yaml \
>>> --do get-perf-table --json '{"perf-domain-id": 0}'
>>> $> tools/net/ynl/pyynl/cli.py \
>>> --spec Documentation/netlink/specs/dev-energymodel.yaml \
>>> --subscribe event --sleep 10
>>>
>>> [1] https://lore.kernel.org/lkml/CAD4GDZy-aeWsiY=-ATr+Y4PzhMX71DFd_mmdMk4rxn3YG8U5GA@mail.gmail.com/
>>> [2] https://lore.kernel.org/lkml/CAJZ5v0gpYQwC=1piaX-PNoyeoYJ7uw=DtAGdTVEXAsi4bnSdbA@mail.gmail.com/
>>
>> My apologies, I've missed those conversations (not the best season).
>>
>> So what would be the procedure here for the review?
>> Could Folks from netlink help here?
>>
>> I will do my bit for the EM related stuff (to double-check them).
>
> I think that it'll be good to have this in 6.19 to avoid making a
> major release with an outdated EM YNL spec and I see that the review
> on the net side is complete, so are there any concerns about this?
I'm sorry for delay.
I don't see concerns. It LGTM so far, I can see that there will be v2
with minor change.
Regards,
Lukasz
> On 30 Dec 2025, at 09:44, Lukasz Luba <lukasz.luba@arm.com> wrote:
>
> Hi Changwoo,
>
>> On 12/25/25 04:01, Changwoo Min wrote:
>> This patch set addresses all the concerns raised at [1] to make the EM YNL spec
>> clearer. It includes the following changes:
>> - Fix the lint errors (1/4).
>> - Rename em.yaml to dev-energymodel.yaml (2/4). “dev-energymodel” was used
>> instead of “device-energy-model”, which was originally proposed [2], because
>> the netlink protocol name cannot exceed GENL_NAMSIZ(16). In addition, docs
>> strings and flags attributes were added.
>> - Change cpus' type from string to u64 array of CPU ids (3/4).
>> - Add dump to get-perf-domains in the EM YNL spec (4/4). A user can fetch
>> either information about a specific performance domain with do or information
>> about all performance domains with dump.
>> This can be tested using the tool, tools/net/ynl/pyynl/cli.py, for example,
>> with the following commands:
>> $> tools/net/ynl/pyynl/cli.py \
>> --spec Documentation/netlink/specs/dev-energymodel.yaml \
>> --dump get-perf-domains
>> $> tools/net/ynl/pyynl/cli.py \
>> --spec Documentation/netlink/specs/dev-energymodel.yaml \
>> --do get-perf-domains --json '{"perf-domain-id": 0}'
>> $> tools/net/ynl/pyynl/cli.py \
>> --spec Documentation/netlink/specs/dev-energymodel.yaml \
>> --do get-perf-table --json '{"perf-domain-id": 0}'
>> $> tools/net/ynl/pyynl/cli.py \
>> --spec Documentation/netlink/specs/dev-energymodel.yaml \
>> --subscribe event --sleep 10
>> [1] https://lore.kernel.org/lkml/CAD4GDZy-aeWsiY=-ATr+Y4PzhMX71DFd_mmdMk4rxn3YG8U5GA@mail.gmail.com/
>> [2] https://lore.kernel.org/lkml/CAJZ5v0gpYQwC=1piaX-PNoyeoYJ7uw=DtAGdTVEXAsi4bnSdbA@mail.gmail.com/
>
> My apologies, I've missed those conversations (not the best season).
>
> So what would be the procedure here for the review?
> Could Folks from netlink help here?
I will review, hopefully later today.
What hardware can it be tested on?
> I will do my bit for the EM related stuff (to double-check them).
>
> Regards,
> Lukasz
© 2016 - 2026 Red Hat, Inc.