mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Gal Pressman <gal@nvidia.com>
Cc: Feng Tang <feng.tang@linux.alibaba.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Mark Bloch <mbloch@nvidia.com>,
	Nimrod Oren <noren@nvidia.com>
Subject: Re: [PATCH] panic: only warn about deprecated panic_print on write access
Date: Mon, 12 Jan 2026 16:03:30 +0100	[thread overview]
Message-ID: <aWUNQr50pItOrJLC@pathway.suse.cz> (raw)
In-Reply-To: <e93ee2bc-b9ca-44cd-a690-be1465500d56@nvidia.com>

On Mon 2026-01-12 08:48:37, Gal Pressman wrote:
> On 12/01/2026 5:32, Feng Tang wrote:
> > On Sun, Jan 11, 2026 at 10:28:55AM +0200, Gal Pressman wrote:
> >> On 08/01/2026 17:52, Petr Mladek wrote:
> >>> On Wed 2026-01-07 15:20:44, Feng Tang wrote:
> >>>> On Wed, Jan 07, 2026 at 08:41:22AM +0200, Gal Pressman wrote:
> >>>>> On 07/01/2026 5:00, Feng Tang wrote:
> >>>>>>> @@ -1014,7 +1015,6 @@ static int panic_print_set(const char *val, const struct kernel_param *kp)
> >>>>>>>  
> >>>>>>>  static int panic_print_get(char *val, const struct kernel_param *kp)
> >>>>>>>  {
> >>>>>>> -	panic_print_deprecated();
> >>>>>>
> >>>>>> Actually this was intentional, in one of the patch version, this
> >>>>>> panic_print_get() was not there but reusing the param_get_ulong().
> >>>>>>
> >>>>>> It was added later as sometimes developer do want to runtime check
> >>>>>> the current 'panic_print' setting through /sys/module/kernel/parameters/
> >>>>>> interface, and I thought it may be better to give the warning.
> >>>>>
> >>>>> I figured it would make sense to keep the behaviors consistent.
> >>>
> >>> I see.
> >>>
> >>>> When people run 'sysctl -a', in 99.9% cases, the users don't care
> >>>> 'panic_print' or even don't know what 'panic_print' is, that's why
> >>>> I think removing it makes sense.
> >>>>
> >>>> But for a user running 'cat /sys/module/kernel/parameters/panic_rint',
> >>>> giving a warning is meaningful.
> >>>
> >>> Makes perfect sense.
> >>>
> >>> We need to make people aware that "panic_print" will eventually go
> >>> away. 'sysctl -a' is different because it prints all values and
> >>> there is big chance that the caller is not interested in "panic_print"
> >>> at all.
> >>>
> >>> It makes sense to remove the warning from sysctl read. But I would
> >>> keep it in sysfs read.
> >>
> >> The sysfs entry exhibits the same issue, just different command:
> >>
> >> # systool -m kernel -v
> >>
> >> Or:
> >>
> >> # grep . /sys/module/kernel/parameters/*

I see.

> > Yes, when user checks the kernel parameters, I think it's better to
> > give them a notice (it's a pr_info_once(), which only prints once
> > for the whole power cycle).
> This log message causes a lot of noise for people who have no idea what
> panic_print is.
> We started seeing this print internally, and it took a long time and
> significant resources to figure out what changed and if we were doing
> anything wrong in our environments.
> 
> Seeing a deprecation notice is alarming, especially if you don't know
> what is being deprecated or how it affects you. In my opinion, we
> shouldn't print this unless someone actually uses panic_print.

I am fine with printing the warning only when the value is
modified (set/write).

Best Regards,
Petr

PS: Sigh, it is hard to change or remove an interface. It is always
    better to think twice before introducing one.

      reply	other threads:[~2026-01-12 15:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06 16:33 Gal Pressman
2026-01-07  3:00 ` Feng Tang
2026-01-07  6:41   ` Gal Pressman
2026-01-07  7:20     ` Feng Tang
2026-01-08 15:52       ` Petr Mladek
2026-01-11  8:28         ` Gal Pressman
2026-01-12  3:32           ` Feng Tang
2026-01-12  6:48             ` Gal Pressman
2026-01-12 15:03               ` Petr Mladek [this message]

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=aWUNQr50pItOrJLC@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=feng.tang@linux.alibaba.com \
    --cc=gal@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=noren@nvidia.com \
    /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®