mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH printk v2 4/5] printk: Add per-console suspended state
Date: Tue, 11 Jul 2023 17:29:43 +0206	[thread overview]
Message-ID: <877cr6pj40.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <20230711150819.GC12154@google.com>

On 2023-07-12, Sergey Senozhatsky <senozhatsky@chromium.org> wrote:
>> @@ -2623,8 +2647,6 @@ void console_lock(void)
>>  		msleep(1000);
>>  
>>  	down_console_sem();
>> -	if (console_suspended)
>> -		return;
>>  	console_locked = 1;
>>  	console_may_schedule = 1;
>>  }
>> @@ -2645,10 +2667,6 @@ int console_trylock(void)
>>  		return 0;
>>  	if (down_trylock_console_sem())
>>  		return 0;
>> -	if (console_suspended) {
>> -		up_console_sem();
>> -		return 0;
>> -	}
>>  	console_locked = 1;
>>  	console_may_schedule = 0;
>>  	return 1;
>
> Interesting. console_locked previously would not be set if
> console is suspended, but now it's always set, which in theory
> changes the way WARN_CONSOLE_UNLOCKED() macro works in some
> cases?

Yes, Petr mentioned [0] this during the v1 review. His direct comment:

  "console_locked" seems to be used only in WARN_CONSOLE_UNLOCKED().
  I could imagine a corner case where, for example, "vt" code does
  not print the warning because it works as it works. But it does
  not make much sense. IMHO, such a code should get fixed. And it
  is just a warning after all.

And his final comment in that thread:

  I believe that @console_suspended is not longer needed.
  Let's replace it with the per-console flag and do not worry
  about races.

John Ogness

[0] https://lore.kernel.org/lkml/ZAieQtcs7YEuCCDa@alley

  reply	other threads:[~2023-07-11 15:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10 13:45 [PATCH printk v2 0/5] various cleanups John Ogness
2023-07-10 13:45 ` [PATCH printk v2 1/5] kdb: do not assume write() callback available John Ogness
2023-07-11  0:25   ` Sergey Senozhatsky
2023-07-11  8:23   ` Daniel Thompson
2023-07-11  8:58     ` John Ogness
2023-07-11  9:01       ` Daniel Thompson
2023-07-10 13:45 ` [PATCH printk v2 2/5] printk: Add NMI safety to console_flush_on_panic() and console_unblank() John Ogness
2023-07-11 15:43   ` Petr Mladek
2023-07-11 16:07     ` Sergey Senozhatsky
2023-07-12 21:11     ` John Ogness
2023-07-13 14:43       ` Petr Mladek
2023-07-14  4:00         ` Sergey Senozhatsky
2023-07-14  9:41           ` Petr Mladek
2023-07-10 13:45 ` [PATCH printk v2 3/5] printk: Consolidate console deferred printing John Ogness
2023-07-11 15:17   ` Sergey Senozhatsky
2023-07-13 14:51   ` Petr Mladek
2023-07-10 13:45 ` [PATCH printk v2 4/5] printk: Add per-console suspended state John Ogness
2023-07-11 15:08   ` Sergey Senozhatsky
2023-07-11 15:23     ` John Ogness [this message]
2023-07-11 15:26       ` Sergey Senozhatsky
2023-07-11 15:30   ` Sergey Senozhatsky
2023-07-13 15:53   ` Petr Mladek
2023-07-10 13:45 ` [PATCH printk v2 5/5] printk: Rename abandon_console_lock_in_panic() to other_cpu_in_panic() John Ogness
2023-07-11  0:22   ` Sergey Senozhatsky
2023-07-13 15:55   ` Petr Mladek

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=877cr6pj40.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome