[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <841pwc11ae.fsf@jogness.linutronix.de>
Date: Wed, 05 Feb 2025 23:26:41 +0106
From: John Ogness <john.ogness@...utronix.de>
To: paulmck@...nel.org, Petr Mladek <pmladek@...e.com>
Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>, rcu@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-team@...a.com, rostedt@...dmis.org,
Frederic Weisbecker <frederic@...nel.org>, Thomas Gleixner
<tglx@...utronix.de>, Alexei Starovoitov <ast@...nel.org>, Andrii Nakryiko
<andrii@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Masami Hiramatsu <mhiramat@...nel.org>, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH rcu v2] 4/5] rcu-tasks: Move RCU Tasks self-tests to
core_initcall()
On 2025-02-05, "Paul E. McKenney" <paulmck@...nel.org> wrote:
>> If there is no backlog, pr_flush() returns immediately.
>
> OK, so I don't need to add "if (IS_ENABLED(CONFIG_PREEMPT_RT))" to guard
> it, then?
For !CONFIG_PREEMPT_RT, if there are legacy consoles registered,
pr_flush() will additionally perform a blocking lock on the
console_lock. The kernel is in a clean shutdown path, so it should not
be a risk to block on the console_lock. But the console_lock is one of
the ugly global locks (semaphore, actually) we are working to remove
because sometimes it still causes problems.
@pmladek: What do you think? Should we have a CONFIG_PREEMPT_RT guard,
which would always be safe? Or do you feel comfortable performing a
console_lock() in the shutdown path for !CONFIG_PREEMPT_RT?
John
Powered by blists - more mailing lists