The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Tomasz Figa <tfiga@chromium.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Pavel Machek <pavel@kernel.org>, Len Brown <lenb@kernel.org>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org, driver-core@lists.linux.dev,
	senozhatsky@chromium.org, Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH v3 1/3] PM: core: Rename module parameters prefix to "power"
Date: Tue, 9 Jun 2026 13:03:50 +0000	[thread overview]
Message-ID: <aigPNvkxRIz36dWm@google.com> (raw)
In-Reply-To: <CAAFQd5Bmm4VeJ2ygOJeQYmdTq1DLBsQdvDkhstA-tUPZr0rB1A@mail.gmail.com>

On Tue, Jun 09, 2026 at 08:17:03PM +0900, Tomasz Figa wrote:
> On Tue, Jun 9, 2026 at 8:10 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
> >
> > On Tue, Jun 9, 2026 at 11:03 AM Tzung-Bi Shih <tzungbi@kernel.org> wrote:
> > >
> > > On Mon, Jun 08, 2026 at 04:11:30PM +0200, Rafael J. Wysocki wrote:
> > > > On Mon, Jun 8, 2026 at 4:16 AM Tzung-Bi Shih <tzungbi@kernel.org> wrote:
> > > > >
> > > > > Currently, the module parameters defined in drivers/base/power/main.c
> > > > > use the default prefix "main" (derived from the filename).  The prefix
> > > > > "main" is too generic and non-descriptive for power management
> > > > > parameters.
> > > > >
> > > > > Redefine MODULE_PARAM_PREFIX to "power." at the beginning of the file
> > > > > to group the module parameters under the "power" namespace instead.
> > > > > This makes the parameters more descriptive.
> > > > >
> > > > > Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
> > > > > ---
> > > > > v3:
> > > > > - No changes.
> > > > >
> > > > > v2: https://lore.kernel.org/all/20260604090756.2884671-2-tzungbi@kernel.org
> > > > > - New to the series.
> > > > >
> > > > > v1: Doesn't exist.
> > > > >
> > > > >  drivers/base/power/main.c | 3 +++
> > > > >  1 file changed, 3 insertions(+)
> > > > >
> > > > > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> > > > > index ed48c292f575..cd864f3a2799 100644
> > > > > --- a/drivers/base/power/main.c
> > > > > +++ b/drivers/base/power/main.c
> > > > > @@ -40,6 +40,9 @@
> > > > >  #include "../base.h"
> > > > >  #include "power.h"
> > > > >
> > > > > +#undef MODULE_PARAM_PREFIX
> > > > > +#define MODULE_PARAM_PREFIX "power."
> > > >
> > > > "power" may be confused with the power supply support, so I'd rather
> > > > use "pm" or even "pm_sleep" (in which case the "dpm_" prefix could be
> > > > dropped from the new module param name in the next patch).
> > >
> > > Ack, will use "pm_sleep" in the next version.
> > >
> > > Regarding dropping the "dpm_" prefix, should this also apply to the existing
> > > dpm_watchdog_all_cpu_backtrace parameter?  Or should we leave it as-is to
> > > avoid breaking existing configurations?
> >
> > Breaking things for someone would be unfortunate.
> >
> > For consistency, let's retain the "dpm_watchdog" part in this name and
> > use it in the new one.
> 
> Hmm, doesn't the prefix change already break things?

Theoretically yes, though it's worth noting that this parameter is
relatively new.  It was introduced in v6.19 (Oct 2025) via commit
a67818f74512 ("PM: dpm_watchdog: add module param to backtrace all CPUs").

To my knowledge, the flag was originally introduced for ChromeOS [1], which
doesn't actually rely on this module parameter in its production
configuration yet [2].

That said, I can't know the status of all other Linux distributions.  If we
want to be 100% safe against breaking existing setups, retaining the "main"
prefix is definitely the safest.

Given its recent introduction and limited known usage, this might be the
best window to rename the prefix before it gains wider adoption.

What are your thoughts?

[1] https://chromium-review.git.corp.google.com/c/chromiumos/third_party/kernel/+/7414781
[2] https://chromium-review.git.corp.google.com/c/chromiumos/third_party/kernel/+/7414721

  reply	other threads:[~2026-06-09 13:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08  2:15 [PATCH v3 0/3] PM: dpm_watchdog: Improve DPM watchdog configurability Tzung-Bi Shih
2026-06-08  2:15 ` [PATCH v3 1/3] PM: core: Rename module parameters prefix to "power" Tzung-Bi Shih
2026-06-08 14:11   ` Rafael J. Wysocki
2026-06-09  9:02     ` Tzung-Bi Shih
2026-06-09 11:10       ` Rafael J. Wysocki
2026-06-09 11:17         ` Tomasz Figa
2026-06-09 13:03           ` Tzung-Bi Shih [this message]
2026-06-09 13:40             ` Rafael J. Wysocki
2026-06-09 16:07               ` Tomasz Figa
2026-06-08  2:15 ` [PATCH v3 2/3] PM: dpm_watchdog: Allow disabling DPM watchdog by default Tzung-Bi Shih
2026-06-08 14:14   ` Rafael J. Wysocki
2026-06-09  9:04     ` Tzung-Bi Shih
2026-06-08  2:15 ` [PATCH v3 3/3] PM: dpm_watchdog: Add sysctl interface for DPM watchdog timeouts Tzung-Bi Shih
2026-06-08 14:22   ` Rafael J. Wysocki
2026-06-09  9:02     ` Tzung-Bi Shih
2026-06-09 11:08       ` Rafael J. Wysocki

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=aigPNvkxRIz36dWm@google.com \
    --to=tzungbi@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=senozhatsky@chromium.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tfiga@chromium.org \
    /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