ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	ksummit <ksummit-discuss@lists.linuxfoundation.org>
Subject: Re: [Ksummit-discuss] [TECH TOPIC] printk redesign
Date: Sat, 24 Jun 2017 19:41:54 -0700	[thread overview]
Message-ID: <CA+55aFzisqGwwG7nNabu_X7=CR45HBrrV4XhgSEw9RkED-A9yg@mail.gmail.com> (raw)
In-Reply-To: <20170625012913.GC27473@lunn.ch>

On Sat, Jun 24, 2017 at 6:29 PM, Andrew Lunn <andrew@lunn.ch> wrote:
>> I'd really hate to have to use pictures of screen...  I really hope that
>> printk to serial console keeps working - I don't care about timestamps
>> granularity, etc., but losing this would hurt.  Is it really that
>> uncommon use case?
>
> It is how the embedded world operates, RS232, or now more often, RS232
> with a built in USB-RS232 converter, so you use USB on the host.

I'm not saying that serial lines shouldn't be an option.

But for a *large* user base, they simply aren't.

On regular PC's, it's often not an option any more. Even in the data
center, it's often not an option any more.

Yes, yes, 99% of the time for the simpler bugs, the machine survives,
and you get a nice oops message.

But that still leaves a reasonably big chunk of cases where you end up
getting an oops in an interrupt (or just in the disk layer itself),
and the machine is just dead, and the oops never makes it to disk.

Maybe people have netconsole or something - with known problems, but
compared to not getting anything those problems are often better than
the alternative. It should never be the default due to the kinds of
issues it has, but it might be a "no other option - I have an ethernet
port on a maintenance network, that's it".

And yes, *maybe* people have a serial line, but those traditional
UARTs close to the CPU are getting pretty rare, even in the embedded
world I think.

USB is no good for "the machine is dead", unless you are one of the
_very_ few people who use USB with the debug port dongle (which
basically bypasses "real" USB and just uses the cable and connector as
a magic serial line).

And yes, things like netconsole absolutely *will* have lockdep issues
and will have situations where it fails.

And yes, even the regular console will have situations where it
deadlocks and fails. Tough. It's probably not even worth it to try to
fix them (ie "oops while taking an interrupt while the CPU was inside
the vgacon driver itself from a previous printk" is just not worth
worrying about). Aim to minimize them in practice to code that has
been made really robust thanks to testing and not being actively
developed.

Put another way: there will always be situations where the console
just does not work. But that is *not* an excuse for looking at
relatively irrelevant stuff (ie sequence numbers etc). We still want
to make sure that when dmesg won't be saved, the console works most of
the time (where "most of the time" is >> 99%).

Out of order messages are survivable. In fact, they are hardly even an
annoyance most of the time.

But not having any messages at all, because we were trying so hard to
abstract things out and put them in buffers so that we couldn't
deadlock with the IO routines, and the timer or workqueue that was
supposed to do it is never going to happen any more because of the bug
that is trying to be printed out?

THAT is bad.

                Linus

  reply	other threads:[~2017-06-25  2:41 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19  5:21 Sergey Senozhatsky
2017-06-19  6:22 ` Hannes Reinecke
2017-06-19 14:39   ` Steven Rostedt
2017-06-19 15:20     ` Andrew Lunn
2017-06-19 15:54       ` Hannes Reinecke
2017-06-19 16:17         ` Andrew Lunn
2017-06-19 16:23         ` Mark Brown
2017-06-20 15:58           ` Sergey Senozhatsky
2017-06-20 16:44             ` Luck, Tony
2017-06-20 17:11               ` Sergey Senozhatsky
2017-06-20 17:27                 ` Mark Brown
2017-06-20 23:28                   ` Steven Rostedt
2017-06-21  7:17                     ` Hannes Reinecke
2017-06-21 11:12                     ` Sergey Senozhatsky
2017-06-22 14:06                       ` Steven Rostedt
2017-06-23  5:43                         ` Sergey Senozhatsky
2017-06-23 13:09                           ` Steven Rostedt
2017-06-21 12:23                     ` Petr Mladek
2017-06-21 14:18                       ` Andrew Lunn
2017-06-23  8:46                         ` Petr Mladek
2017-06-21 16:09                       ` Andrew Lunn
2017-06-23  8:49                         ` Petr Mladek
2017-07-19  7:35                   ` David Woodhouse
2017-07-20  7:53                     ` Sergey Senozhatsky
2017-06-20 16:09         ` Sergey Senozhatsky
2017-06-19 16:26       ` Steven Rostedt
2017-06-19 16:35         ` Andrew Lunn
2017-06-24 11:14         ` Mauro Carvalho Chehab
2017-06-24 14:06           ` Andrew Lunn
2017-06-24 22:42             ` Steven Rostedt
2017-06-24 23:21               ` Andrew Lunn
2017-06-24 23:26                 ` Linus Torvalds
2017-06-24 23:40                   ` Steven Rostedt
2017-06-26 11:16                     ` Sergey Senozhatsky
2017-06-24 23:48                   ` Al Viro
2017-06-25  1:29                     ` Andrew Lunn
2017-06-25  2:41                       ` Linus Torvalds [this message]
2017-06-26  8:46                         ` Jiri Kosina
2017-07-19  7:59                           ` David Woodhouse
2017-06-20 15:56     ` Sergey Senozhatsky
2017-06-20 18:45     ` Daniel Vetter
2017-06-21  9:29       ` Petr Mladek
2017-06-21 10:15       ` Sergey Senozhatsky
2017-06-22 13:42         ` Daniel Vetter
2017-06-22 13:48           ` Daniel Vetter
2017-06-23  9:07             ` Bartlomiej Zolnierkiewicz
2017-06-27 13:06               ` Sergey Senozhatsky
2017-06-23  5:20           ` Sergey Senozhatsky
2017-06-19 23:46 ` Josh Triplett
2017-06-20  8:24   ` Arnd Bergmann
2017-06-20 14:36     ` Steven Rostedt
2017-06-20 15:26       ` Sergey Senozhatsky
2017-06-22 16:35 ` David Howells
2017-07-19  6:24 ` Sergey Senozhatsky
2017-07-19  6:25   ` Sergey Senozhatsky
2017-07-19  7:26     ` Daniel Vetter
2017-07-20  5:19       ` Sergey Senozhatsky

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='CA+55aFzisqGwwG7nNabu_X7=CR45HBrrV4XhgSEw9RkED-A9yg@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=andrew@lunn.ch \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=mchehab@s-opensource.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