mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] printk: Make CONSOLE_LOGLEVEL_QUIET configurable
Date: Wed, 20 Jun 2018 15:37:47 +0200	[thread overview]
Message-ID: <f60d844d-9d3b-3154-4eec-982432c8e502@redhat.com> (raw)
In-Reply-To: <20180620110335.sjzmtra2z3chvon2@pathway.suse.cz>

Hi,

On 20-06-18 13:03, Petr Mladek wrote:
> On Tue 2018-06-19 13:57:26, Hans de Goede wrote:
>> The goal of passing the "quiet" option to the kernel is for the kernel
>> to be quiet unless something really is wrong.
>>
>> Sofar passing quiet has been (mostly) equivalent to passing
>> loglevel=4 on the kernel commandline. Which means to show any messages
>> with a level of KERN_ERR or higher severity on the console.
>>
>> In practice this often does not result in a quiet boot though, since
>> there are many false-positive or otherwise harmless error messages printed,
>> defeating the purpose of the quiet option. Esp. the ACPICA code is really
>> bad wrt this, but there are plenty of others too.
> 
> I see your pain. But this sounds like a workaround for a broken code.
> This change might just encourage people to create even more mess.

I've been submitting patches upstream to fix false-positive KERN_ERR
messages for more then a year now and getting a KERN_ERR free kernel
(on more then 1 specific model hw) is just undoable. Every release some
new nonsense error comes up, like e.g.:

https://bugzilla.redhat.com/show_bug.cgi?id=1568276

Besides this random KERN_ERR cases (of which there are plenty
by themselves) I've also had long discussions with the ACPICA upstream
maintainers, but they refuse to change this instead insisting that:

a) Vendors should fix there DSDTs to be perfect; and
b) end-users should then update their BIOS to fix this

Neither of which is a realistic expectation in anyway.

IOW I've tried to fix this the right way and I will keep posting patches
to keep "dmesg --level=err" output to a minimum, but it simply is not
feasible to get the desired quiet boot with its current configuration
of quiet mapping to loglevel=4.

>> This commit makes CONSOLE_LOGLEVEL_QUIET configurable.
>>
>> This for example will allow distros which want quiet to really mean quiet
>> to set CONSOLE_LOGLEVEL_QUIET so that only messages with a higher severity
>> then KERN_ERR (CRIT, ALERT, EMERG) get printed, avoiding an endless game
>> of whack-a-mole silencing harmless error messages.
> 
> I find it a bit confusing that "quiet" would mean something different
> on different systems.

The kernel is so configurable already that I don't think this really is much
of an issue, quiet will still mean quiet on all systems, some might just
be a tad more quiet (or actually be quiet) compared to others.

The same argument could be made for the default loglevel being configurable,
yet it is configurable already.

> Why did not you use loglevel=<whatever_you_need> instead of "quiet"?

We would still need to pass quiet, to also silence e.g. the messages
from the EDD code, see arch/x86/boot/edd.c around line 147 and further,
so then we would need to pass:

quiet loglevel=3

And we would need to pass it in that order! which is ugly also this
complicates giving people instructions to turn it off to debug
system not-booting problems.

> Alternative solution would be to add "silent" or so to calm down
> everything. But I am afraid that any change in this area would
> just create a mess similar to grep -s and -q options.

A better alternative would be to make quiet actually does what the
name suggests and simply unconditionally change
CONSOLE_LOGLEVEL_QUIET from 4 to 3. I went with making this configurable
because I expect that to be a controversial change.

A third, sucky, alternative would be for Fedora to permanently
carry a downstream patch changing the CONSOLE_LOGLEVEL_QUIET from 4
to 3 in printk.h. That would still lead to the confusion about quiet
not meaning the same everywhere (although I would expect e.g. Ubuntu
to follow suit) combined with extra downstream patches which are never
good.

Regards,

Hans


  parent reply	other threads:[~2018-06-20 13:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 11:57 Hans de Goede
2018-06-19 13:31 ` Steven Rostedt
2018-06-20  6:34   ` Sergey Senozhatsky
2018-06-20 11:03 ` Petr Mladek
2018-06-20 11:24   ` Sergey Senozhatsky
2018-06-20 13:43     ` Hans de Goede
2018-06-21  1:43       ` Sergey Senozhatsky
2018-06-20 13:37   ` Hans de Goede [this message]
2018-06-25 14:56     ` Petr Mladek
2018-06-20 14:07   ` Steven Rostedt
2018-06-20 14:18     ` Takashi Iwai

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=f60d844d-9d3b-3154-4eec-982432c8e502@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.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®