GenPD Subsystem Posted For Linux 6.6 - Torvalds Wonders What The Heck Is "GenPD"

Written by Michael Larabel in Linux Kernel on 31 August 2023 at 06:19 AM EDT. 21 Comments
LINUX KERNEL
A pull request was sent out this week to introduce the GenPD subsystem and add a new drivers/genpd area for the GenPD provider drivers to the kernel... To which Linus Torvalds wonders what the heck is a "GenPD" as probably most of you are also wondering about.

Linux creator Linus Torvalds is known at times to vocalize his distaste for some acronyms and drawing his ire this week is GenPD. This pull request adds the GenPD provider subsystem and begins moving other existing SoC code to there with already having around 60 users of the GenPD provider interface in the kernel. But it never ultimately explained what is GenPD.

Thus another classic Linus Torvalds message:
I was starting to pull this, and then tried to figure out what the heck "genpd" is.

Absolutely nothing in the pull request explains what it might be.

Even after actually pulling it, I couldn't really find anything useful.

The closest seems to be the MAINTAINERS file entry that says "GENERIC PM DOMAIN PROVIDERS", which doesn't actually clarify anything.

Ok, so we have a Kconfig option for PM_GENERIC_DOMAINS, so I looked at that. It has no help-text, as it is entirely an internal generated one.

End result: I decided that without any kind of explanation at all, "genpd" is a completely useless name, and that I don't want to randomly add a new directory with zero explanation for what the heck it is.

So I ended up unpulling it, because if I had to google what it is, I wasn't going to pull it.

Can we please agree that

(a) five random letters in a row does not documentation make

(b) if we have a new subsystem, it should damn well have some explanation for it

And even if you send me a new pull request with an actual explanation for the term, do we really have to use such a horribly nasty name?

This is not some kind of industry standard shorthand.

Yes, google does find the term "genpd" having been used for a few years in Linux SoC-land, but are we really so short on diskspace that we can't use more descriptive names?

Now I look at this disaster area with no documentation, and realize that it ends up also being part of Arnd's series of SoC pulls.

What a horrible thing this is. Please don't use random letter combinations that have absolutely no meaning to anybody else, and that aren't even explained.

Torvalds then went on to reply to himself adding:
Side note: at least to me, 'gen' is short for 'generate'. Looking at existing kernel naming, that's how we've used it (lots of examples of that from different areas).

Do we also have "generic"? Yes. And because 'gen' does not mean 'generic' to anybody, we've typically spelled it out - as in asm-generic, but also 'sound/soc/generic', or in fact a _lot_ of other examples.

Because we really aren't that close to running out of letters.

As to the 'pd' part, it actually has a fairly widely used meaning in the industry, but it tends to be 'power delivery', in the USB-C sense.

So I really find that short-hand actively misleading,

I realize that the SoC code has used that shorthand internally, but once you expose it like this, I really think you should do a much better job at naming.

GenPD in this context ends up standing for Generic Power Domains and is an abstraction for how power is controlled for components on a SoC with the relationship between devices and power controllers. Not really exciting for end-users but important for SoC folks and the latest example of the importance of accurate naming.

Linus Torvalds did end up honoring the pull request last night but has requested this subsystem be renamed prior to the Linux 6.6 merge window closing at the end of next week. Suggestions have been raised like renaming it simply to drivers/power/generic as at least providing more clarity than just "GenPD".
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week