lkml.org 
[lkml]   [2022]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk: Make console tracepoint safe in NMI() context
On Fri, 15 Jul 2022 14:01:52 +0200
Petr Mladek <pmladek@suse.com> wrote:

> + /*
> + * trace_console_rcuidle() is not working in NMI. printk()
> + * is used more often in NMI than in rcuidle context.
> + * Choose the less evil solution here.
> + *
> + * raw_smp_processor_id() is reliable in rcuidle context.
> + */
> + TP_CONDITION(!rcu_is_idle_cpu(raw_smp_processor_id())),
> +

As Marco mentioned in the other thread, would a check for
'rcu_is_watching()' be better?

-- Steve


> TP_STRUCT__entry(
> __dynamic_array(char, msg, len + 1)
> ),

\
 
 \ /
  Last update: 2022-07-15 17:04    [W:1.694 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site