public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: xu xin <xu.xin.sc@gmail.com>
Cc: xu.xin16@zte.com.cn, john.ogness@linutronix.de,
	linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org,
	liu.chun2@zte.com.cn, rostedt@goodmis.org, si.hao@zte.com.cn,
	yang.yang29@zte.com.cn, zhang.yunkai@zte.com.cn
Subject: Re: [PATCH  5.10-rt] printk: ignore that console preempted by irq/softirq
Date: Tue, 28 May 2024 17:29:33 +0200	[thread overview]
Message-ID: <20240528152933.ns7uyFSD@linutronix.de> (raw)
In-Reply-To: <20240528064003.776618-1-xu.xin16@zte.com.cn>

On 2024-05-28 06:40:03 [+0000], xu xin wrote:
> > This does not apply.
> > There is `may_sleep' set earlier.
> > 
> > There is no console_lock() around for each…
> > 
> 
> Sorry, I don't get it.
> 
> To clarify it again, this patch aims to solve the useless waiting of pr_flush
> when the console is preempted by the current irq/softirq. This has nothing to
> do with might_sleep().

There is a `may_sleep` variable set earlier. Couldn't that be re-used?

> > The other question is which kernel started enforcing might_sleep() for
> > pr_flush(). This should be applied to all kernel or none so we don't
> > have random behaviour across kernels (5.4 yes, 5.10 no, 5.15 yes).
> >
> 
> Sorry, my understanding is that pr_flush didn't start enforcing might_sleep().
> This patch can apply to 5.10 and 5.15 where the problem exist.

Starting with v6.1-RT there is a might_sleep() at the beginning of
pr_flush(). This means that atomic context can not be used anymore.
Therefore is patch needs only to be applied to 5.10 and 5.15 as you
said. I just didn't see the information the following kernels (>=6.1)
already had that might_sleep() check and the previous (<5.4) lack
pr_flush().

> > This is a delay of max 1 sec during bug() and panic(). Not sure how
> > "critical" this is…
> 
> In some industrial control scenarios, bugs and warnings containning a
> pr_flush delay of 1 sec is very critical to the upper services.
> 
> Especiall for watchdog timeout(< 2s), just WARN can easily lead to system reset,
> which is unacceptible.

Now this would be important piece of information for the changelog in
terms of _why_ we do this.
You don't have an atomic console, do you? Because if this BUG/ WARNING is
printed via the atomic console then it could also raise your 1sec limit.

Sebastian

  reply	other threads:[~2024-05-28 15:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 15:55 [PATCH 5.10-rt] printk: ignore that console preempted by irq/softirq xu.xin16
2024-05-26 17:46 ` John Ogness
2024-05-27  9:24 ` Sebastian Andrzej Siewior
2024-05-28  6:40 ` xu xin
2024-05-28 15:29   ` Sebastian Andrzej Siewior [this message]
2024-06-03 20:11     ` John Ogness
2024-06-12 14:33       ` Sebastian Andrzej Siewior

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=20240528152933.ns7uyFSD@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=liu.chun2@zte.com.cn \
    --cc=rostedt@goodmis.org \
    --cc=si.hao@zte.com.cn \
    --cc=xu.xin.sc@gmail.com \
    --cc=xu.xin16@zte.com.cn \
    --cc=yang.yang29@zte.com.cn \
    --cc=zhang.yunkai@zte.com.cn \
    /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