mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Changwoo Min <changwoo@igalia.com>
To: Donald Hunter <donald.hunter@gmail.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	linux-pm@vger.kernel.org, sched-ext@lists.linux.dev,
	Jakub Kicinski <kuba@kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Concerns with em.yaml YNL spec
Date: Sun, 14 Dec 2025 20:14:08 +0900	[thread overview]
Message-ID: <5d3c37c0-d956-410d-83c8-24323d6f2aea@igalia.com> (raw)
In-Reply-To: <CAD4GDZy-aeWsiY=-ATr+Y4PzhMX71DFd_mmdMk4rxn3YG8U5GA@mail.gmail.com>

Hi Donald,



Thanks for the feedback. I rearranged a paragraph in the original email
for easier reply.


On 12/12/25 00:54, Donald Hunter wrote:
> Hi,
> 

 > I guess the patch series was never cced to netdev or the YNL
 > maintainers so this is my first opportunity to review it.
 >

You are right. I think I ran get_maintainer.pl only before adding
em.yaml. That's my bad.

> 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 will fix these lint warnings. Besides fixing those warnings, it would
be useful to mention running lint somewhere. If there is a general
guideline for adding a new netlink YAML, I will revise it in a separate
patch.

> 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.
> 

That makes sense. I will change as suggested.

> - 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).
 >

TODO


> - 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.
> 

Okay. I will add the following (from energy_model.h) for the flags:

#define EM_PERF_DOMAIN_MICROWATTS BIT(0)
#define EM_PERF_DOMAIN_SKIP_INEFFICIENCIES BIT(1)
#define EM_PERF_DOMAIN_ARTIFICIAL BIT(2)

> - 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.
> 

Okay. I will change the string representation to an integer array of CPU
numbers.

> - 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
> 

Sure, I will add doc strings based on the comments in the
energy_model.h.

> Given that netlink is UAPI, I think we need to address these issues
> before v6.19 gets released.

Sure. I will prepare the changes quickly.

Regards,
Changwoo Min

> 
> Thanks,
> Donald Hunter.
> 
> [1] https://lore.kernel.org/all/20251020220914.320832-4-changwoo@igalia.com/
> 


  parent reply	other threads:[~2025-12-14 11:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-11 15:54 Donald Hunter
2025-12-11 17:01 ` Andrew Lunn
2025-12-14 11:35   ` Changwoo Min
2025-12-14 16:21     ` Andrew Lunn
2025-12-15  1:57       ` Changwoo Min
2025-12-15 10:30         ` Rafael J. Wysocki
2025-12-15 15:01           ` Changwoo Min
2025-12-15 15:06             ` Rafael J. Wysocki
2025-12-16  2:06               ` Changwoo Min
2025-12-11 17:04 ` Andrew Lunn
2025-12-11 17:09   ` Donald Hunter
2025-12-11 17:47     ` Andrew Lunn
2025-12-14 11:14 ` Changwoo Min [this message]
2025-12-14 11:38   ` Changwoo Min
2025-12-15 10:51   ` Donald Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5d3c37c0-d956-410d-83c8-24323d6f2aea@igalia.com \
    --to=changwoo@igalia.com \
    --cc=donald.hunter@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=sched-ext@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®