[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD4GDZy-aeWsiY=-ATr+Y4PzhMX71DFd_mmdMk4rxn3YG8U5GA@mail.gmail.com>
Date: Thu, 11 Dec 2025 15:54:53 +0000
From: Donald Hunter <donald.hunter@...il.com>
To: Changwoo Min <changwoo@...lia.com>, Lukasz Luba <lukasz.luba@....com>, linux-pm@...r.kernel.org,
sched-ext@...ts.linux.dev, Jakub Kicinski <kuba@...nel.org>,
Network Development <netdev@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Concerns with em.yaml YNL spec
Hi,
I just spotted the new em.yaml YNL spec that got merged in
bd26631ccdfd ("PM: EM: Add em.yaml and autogen files") as part of [1]
because it introduced new yamllint reports:
make -C tools/net/ynl/ lint
make: Entering directory '/home/donaldh/net-next/tools/net/ynl'
yamllint ../../../Documentation/netlink/specs
../../../Documentation/netlink/specs/em.yaml
3:1 warning missing document start "---" (document-start)
107:13 error wrong indentation: expected 10 but found 12 (indentation)
I guess the patch series was never cced to netdev or the YNL
maintainers so this is my first opportunity to review it.
Other than the lint messages, there are a few concerns with the
content of the spec:
- pds, pd and ps might be meaningful to energy model experts but they
are pretty meaningless to the rest of us. I see they are spelled out
in the energy model header file so it would be better to use
perf-domain, perf-table and perf-state here.
- I think the spec could have been called energy-model.yaml and the
family called "energy-model" instead of "em".
- the get-pds should probably be both do and dump which would give
multi responses without the need for the pds attribute set (unless I'm
missing something).
- there are 2 flags attributes that are bare u64 which should have
flags definitions in the YNL. Have a look at e.g. netdev.yaml to see
examples of flags definitions.
- the cpus attribute is a string which would appear to be a "%*pb"
stringification of a bitmap. That's not very consumable for a UAPI and
should probably use netlink bitmask or an array of cpu numbers or
something.
- there are no doc strings for any of the attributes. It would be
great to do better for new YNL specs, esp. since there is better
information in energy_model.h
Given that netlink is UAPI, I think we need to address these issues
before v6.19 gets released.
Thanks,
Donald Hunter.
[1] https://lore.kernel.org/all/20251020220914.320832-4-changwoo@igalia.com/
Powered by blists - more mailing lists