From: John Ogness <john.ogness@linutronix.de>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Petr Mladek <pmladek@suse.com>, Nigel Croxon <ncroxon@redhat.com>,
"Theodore Y. Ts'o" <tytso@mit.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
dm-devel@redhat.com, Mikulas Patocka <mpatocka@redhat.com>,
linux-serial@vger.kernel.org
Subject: Re: Serial console is causing system lock-up
Date: Thu, 07 Mar 2019 11:37:53 +0100 [thread overview]
Message-ID: <87o96nezr2.fsf@linutronix.de> (raw)
In-Reply-To: <20190307091748.GA6307@jagdpanzerIV> (Sergey Senozhatsky's message of "Thu, 7 Mar 2019 18:17:48 +0900")
On 2019-03-07, Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> wrote:
>>>> When the console is constantly printing messages, I wouldn't say
>>>> that looks like a lock-up scenario. It looks like the system is
>>>> busy printing critical information to the console (which it is).
>>>
>>> What if we have N tasks/CPUs calling printk() simultaneously?
>>
>> Then they take turns printing their messages to the console, spinning
>> until they get their turn. This still is not and does not look like a
>> lock-up. But I think you already know this, so I don't understand the
>> reasoning behind asking the question. Maybe you could clarify what
>> you are getting at.
>
> Sorry John, the reasoning is that I'm trying to understand
> why this does not look like soft or hard lock-up or RCU stall
> scenario.
The reason is that you are seeing data being printed on the console. The
watchdogs (soft, hard, rcu, nmi) are all touched with each emergency
message.
> The CPU which spins on prb_lock() can have preemption disabled and,
> additionally, can have local IRQs disabled, or be under RCU read
> side lock. If consoles are busy, then there are CPUs which printk()
> data and keep prb_lock contended; prb_lock() does not seem to be
> fair. What am I missing?
You are correct. Making prb_lock fair might be something we want to look
into. Perhaps also based on the loglevel of what needs to be
printed. (For example, KERN_ALERT always wins over KERN_CRIT.)
> You probably talk about the case when all
> printing CPUs are in preemptible contexts (assumingly this is what
> is happening in dm-integrity case) so they can spin on prb_lock(),
> that's OK. The case I'm talking about is - what if we have the same
> situation, but then one of the CPUs printk()-s from !preemptible.
> Does this make sense?
Yes, you are referring to a worst case. We could have local_irqs
disabled on every CPU while every CPU is hit with an NMI and all those
NMIs want to dump a load of messages. The rest of the system will be
frozen until those NMI printers can finish. But that is still not a
lock-up. At some point those printers should finish and eventually the
system should be able to resume.
John Ogness
next prev parent reply other threads:[~2019-03-07 10:37 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-06 14:27 Serial console is causing system lock-up Mikulas Patocka
2019-03-06 15:22 ` Petr Mladek
2019-03-06 16:07 ` Mikulas Patocka
2019-03-06 16:30 ` Theodore Y. Ts'o
2019-03-06 17:11 ` Mikulas Patocka
2019-03-06 22:19 ` Steven Rostedt
2019-03-06 22:43 ` John Ogness
2019-03-07 2:22 ` Sergey Senozhatsky
2019-03-07 8:17 ` John Ogness
2019-03-07 8:25 ` Sergey Senozhatsky
2019-03-07 8:34 ` John Ogness
2019-03-07 9:17 ` Sergey Senozhatsky
2019-03-07 10:37 ` John Ogness [this message]
2019-03-07 12:26 ` Sergey Senozhatsky
2019-03-07 12:54 ` Mikulas Patocka
2019-03-07 14:21 ` John Ogness
2019-03-07 15:35 ` Petr Mladek
2019-03-12 2:32 ` Sergey Senozhatsky
2019-03-12 8:17 ` John Ogness
2019-03-12 8:59 ` Sergey Senozhatsky
2019-03-12 10:05 ` Mikulas Patocka
2019-03-12 13:19 ` John Ogness
2019-03-12 13:44 ` Petr Mladek
2019-03-12 12:08 ` Petr Mladek
2019-03-12 15:19 ` John Ogness
2019-03-13 2:38 ` Sergey Senozhatsky
2019-03-13 8:43 ` John Ogness
2019-03-14 10:30 ` Sergey Senozhatsky
2019-03-07 14:08 ` John Stoffel
2019-03-07 14:26 ` Mikulas Patocka
2019-03-08 1:22 ` Sergey Senozhatsky
2019-03-08 1:39 ` Sergey Senozhatsky
2019-03-08 2:36 ` John Ogness
2019-03-07 15:16 ` Petr Mladek
2019-03-07 1:56 ` Sergey Senozhatsky
2019-03-07 13:12 ` Mikulas Patocka
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=87o96nezr2.fsf@linutronix.de \
--to=john.ogness@linutronix.de \
--cc=dm-devel@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=ncroxon@redhat.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=tytso@mit.edu \
/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