Messages in this thread | | | Date | Fri, 15 Jul 2022 11:02:48 -0400 | From | Steven Rostedt <> | Subject | Re: [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) > ),
| |