mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Donghyeok Choe <d7271.choe@samsung.com>
To: pmladek@suse.com
Cc: linux-kernel@vger.kernel.org, john.ogness@linutronix.de,
	takakura@valinux.co.jp, youngmin.nam@samsung.com,
	hajun.sung@samsung.com, seungh.jung@samsung.com,
	jh1012.choi@samsung.com
Subject: printk: selective deactivation of feature ignoring non panic cpu's messages
Date: Wed, 26 Feb 2025 12:16:28 +0900	[thread overview]
Message-ID: <20250226031628.GB592457@tiffany> (raw)
In-Reply-To: <CGME20250226031756epcas2p3674cccc82687effb40575aa5fa2956e0@epcas2p3.samsung.com>

[-- Attachment #1: Type: text/plain, Size: 2682 bytes --]

Hello.

In 'Commit 779dbc2e78d7', a feature was included in which the message
from non panic cpu was ignored. I understand that panic cpu's message
is the most important feature in the SW livelockup issue.

However, SOC vendor's linux kernel device driver developers
in environments where hw reliability is not guaranteed The message
from non panic cpu is also important.

In the process of performing a panic when a specific cpu is fault,
another cpu has the ability to output important err information
through interrupt. If a particular cpu has an incorrect sfr access,
the debugging device driver's ISR behavior to debug it helps you
identify the problem easily.

I can output non panic cpu's backtrace through Commit bcc954c6caba,
but this seems to be not enough for me.
I would like to print out the message of non panic cpu as it is.
Can I use early_param to selectively disable that feature?

For example, as below.
I'm sending you an inquiry instead of a patch because I need to share
more about my problem situation.
Please forgive me if I broke the mailing etiquette.

ex)

diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index fb242739aec8..3f420e8bdb2c 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -2368,6 +2368,17 @@ void printk_legacy_allow_panic_sync(void)
        }
 }

+static bool __read_mostly keep_printk_all_cpu_in_panic;
+
+static int __init keep_printk_all_cpu_in_panic_setup(char *str)
+{
+       keep_printk_all_cpu_in_panic = true;
+       pr_info("printk: keep printk all cpu in panic.\n");
+
+       return 0;
+}
+early_param("keep_printk_all_cpu_in_panic", keep_printk_all_cpu_in_panic_setup);
+
 asmlinkage int vprintk_emit(int facility, int level,
                            const struct dev_printk_info *dev_info,
                            const char *fmt, va_list args)
@@ -2379,13 +2390,15 @@ asmlinkage int vprintk_emit(int facility, int level,
        if (unlikely(suppress_printk))
                return 0;

-       /*
-        * The messages on the panic CPU are the most important. If
-        * non-panic CPUs are generating any messages, they will be
-        * silently dropped.
-        */
-       if (other_cpu_in_panic() && !panic_triggering_all_cpu_backtrace)
-               return 0;
+       if (!keep_printk_all_cpu_in_panic) {
+               /*
+                * The messages on the panic CPU are the most important. If
+                * non-panic CPUs are generating any messages, they will be
+                * silently dropped.
+                */
+               if (other_cpu_in_panic() && !panic_triggering_all_cpu_backtrace)
+                       return 0;
+       }

Thank you.

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



       reply	other threads:[~2025-02-26  3:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250226031756epcas2p3674cccc82687effb40575aa5fa2956e0@epcas2p3.samsung.com>
2025-02-26  3:16 ` Donghyeok Choe [this message]
2025-02-26  4:25   ` John Ogness
2025-02-26 13:58     ` Petr Mladek
2025-02-28 14:20       ` John Ogness
2025-03-04  2:01         ` Donghyeok Choe
2025-03-04 13:22         ` Petr Mladek
2025-03-04 13:59           ` John Ogness
2025-03-04 14:15             ` Petr Mladek
2025-03-17  5:06               ` Donghyeok Choe

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=20250226031628.GB592457@tiffany \
    --to=d7271.choe@samsung.com \
    --cc=hajun.sung@samsung.com \
    --cc=jh1012.choi@samsung.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=seungh.jung@samsung.com \
    --cc=takakura@valinux.co.jp \
    --cc=youngmin.nam@samsung.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

all inboxes | Powered by JetHome®