public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] softirq: Print the function name
@ 2026-01-05  9:41 Enlin Mu
  2026-01-06  6:16 ` enlin.mu
  0 siblings, 1 reply; 5+ messages in thread
From: Enlin Mu @ 2026-01-05  9:41 UTC (permalink / raw)
  To: tglx, bigeasy, boqun.feng, mingo, ryotkkr98, linux-kernel,
	enlin.mu, enlin.mu

Adjust the printing format from the function address to
the function name.

Signed-off-by: Enlin Mu <enlin.mu@unisoc.com>
Signed-off-by: Enlin Mu <enlin.mu@linux.dev>
---
 kernel/softirq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/softirq.c b/kernel/softirq.c
index 77198911b8dd..68ef18616fb9 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -622,7 +622,7 @@ static void handle_softirqs(bool ksirqd)
 		h->action();
 		trace_softirq_exit(vec_nr);
 		if (unlikely(prev_count != preempt_count())) {
-			pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n",
+			pr_err("huh, entered softirq %u %s %pS with preempt_count %08x, exited with %08x?\n",
 			       vec_nr, softirq_to_name[vec_nr], h->action,
 			       prev_count, preempt_count());
 			preempt_count_set(prev_count);
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] softirq: Print the function name
  2026-01-05  9:41 [PATCH] softirq: Print the function name Enlin Mu
@ 2026-01-06  6:16 ` enlin.mu
  2026-01-08 21:39   ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: enlin.mu @ 2026-01-06  6:16 UTC (permalink / raw)
  To: tglx, bigeasy, boqun.feng, mingo, ryotkkr98, linux-kernel,
	enlin.mu



On 2026/1/5 17:41, Enlin Mu wrote:
> Adjust the printing format from the function address to
> the function name.
> 
> Signed-off-by: Enlin Mu <enlin.mu@unisoc.com>
> Signed-off-by: Enlin Mu <enlin.mu@linux.dev>
> ---
>   kernel/softirq.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/softirq.c b/kernel/softirq.c
> index 77198911b8dd..68ef18616fb9 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -622,7 +622,7 @@ static void handle_softirqs(bool ksirqd)
>   		h->action();
>   		trace_softirq_exit(vec_nr);
>   		if (unlikely(prev_count != preempt_count())) {
> -			pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n",
> +			pr_err("huh, entered softirq %u %s %pS with preempt_count %08x, exited with %08x?\n",
>   			       vec_nr, softirq_to_name[vec_nr], h->action,
>   			       prev_count, preempt_count());

Hi All

My test results are as follows:

before this patch:

[   49.919574] softirq: huh, entered softirq 1 TIMER 00000000bb45ef3a 
with preempt_count 00000101, exited with 00000101?


after this patch:

[   49.919570] softirq: huh, entered softirq 1 TIMER 
run_timer_softirq+0x0/0x108 with preempt_count 00000101, exited with 
00000102?

>   			preempt_count_set(prev_count);


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] softirq: Print the function name
  2026-01-06  6:16 ` enlin.mu
@ 2026-01-08 21:39   ` Thomas Gleixner
  2026-01-12 11:06     ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2026-01-08 21:39 UTC (permalink / raw)
  To: enlin.mu, bigeasy, boqun.feng, mingo, ryotkkr98, linux-kernel,
	enlin.mu

On Tue, Jan 06 2026 at 14:16, enlin.mu wrote:
> On 2026/1/5 17:41, Enlin Mu wrote:
>> Adjust the printing format from the function address to
>> the function name.
>> 
>> Signed-off-by: Enlin Mu <enlin.mu@unisoc.com>
>> Signed-off-by: Enlin Mu <enlin.mu@linux.dev>
>> ---
>>   kernel/softirq.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/kernel/softirq.c b/kernel/softirq.c
>> index 77198911b8dd..68ef18616fb9 100644
>> --- a/kernel/softirq.c
>> +++ b/kernel/softirq.c
>> @@ -622,7 +622,7 @@ static void handle_softirqs(bool ksirqd)
>>   		h->action();
>>   		trace_softirq_exit(vec_nr);
>>   		if (unlikely(prev_count != preempt_count())) {
>> -			pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n",
>> +			pr_err("huh, entered softirq %u %s %pS with preempt_count %08x, exited with %08x?\n",
>>   			       vec_nr, softirq_to_name[vec_nr], h->action,
>>   			       prev_count, preempt_count());
>
> Hi All
>
> My test results are as follows:
>
> before this patch:
>
> [   49.919574] softirq: huh, entered softirq 1 TIMER 00000000bb45ef3a 
> with preempt_count 00000101, exited with 00000101?
>
>
> after this patch:
>
> [   49.919570] softirq: huh, entered softirq 1 TIMER 
> run_timer_softirq+0x0/0x108 with preempt_count 00000101, exited with 
> 00000102?

The TIMER softirq always invoked run_timer_softirq(). If that happens
then the interesting question is not the softirq action handler, but any
function it invoked from there. So there is _zero_ value of adding this.

Thanks,

        tglx




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] softirq: Print the function name
  2026-01-08 21:39   ` Thomas Gleixner
@ 2026-01-12 11:06     ` Sebastian Andrzej Siewior
  2026-01-20  0:26       ` enlin.mu
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2026-01-12 11:06 UTC (permalink / raw)
  To: Thomas Gleixner, enlin.mu
  Cc: boqun.feng, mingo, ryotkkr98, linux-kernel, enlin.mu

On 2026-01-08 22:39:14 [+0100], Thomas Gleixner wrote:
> On Tue, Jan 06 2026 at 14:16, enlin.mu wrote:
> > On 2026/1/5 17:41, Enlin Mu wrote:
> >> Adjust the printing format from the function address to
> >> the function name.
> The TIMER softirq always invoked run_timer_softirq(). If that happens
> then the interesting question is not the softirq action handler, but any
> function it invoked from there. So there is _zero_ value of adding this.

Removing h->action from the print would be an improvement.

> Thanks,
> 
>         tglx

Sebastian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] softirq: Print the function name
  2026-01-12 11:06     ` Sebastian Andrzej Siewior
@ 2026-01-20  0:26       ` enlin.mu
  0 siblings, 0 replies; 5+ messages in thread
From: enlin.mu @ 2026-01-20  0:26 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior, Thomas Gleixner
  Cc: boqun.feng, mingo, ryotkkr98, linux-kernel, enlin.mu



On 2026/1/12 19:06, Sebastian Andrzej Siewior wrote:
> On 2026-01-08 22:39:14 [+0100], Thomas Gleixner wrote:
>> On Tue, Jan 06 2026 at 14:16, enlin.mu wrote:
>>> On 2026/1/5 17:41, Enlin Mu wrote:
>>>> Adjust the printing format from the function address to
>>>> the function name.
> …
>> The TIMER softirq always invoked run_timer_softirq(). If that happens
>> then the interesting question is not the softirq action handler, but any
>> function it invoked from there. So there is _zero_ value of adding this.
> 
> Removing h->action from the print would be an improvement.
> 
If everyone agrees, I'll resubmit a patch.
>> Thanks,
>>
>>          tglx
> 
> Sebastian


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-20  0:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-05  9:41 [PATCH] softirq: Print the function name Enlin Mu
2026-01-06  6:16 ` enlin.mu
2026-01-08 21:39   ` Thomas Gleixner
2026-01-12 11:06     ` Sebastian Andrzej Siewior
2026-01-20  0:26       ` enlin.mu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox