> -----Original Message----- > From: Paul E. McKenney <paulmck@xxxxxxxxxx> > Sent: Friday, February 19, 2021 3:59 AM > > On Thu, Feb 18, 2021 at 01:24:16PM -0500, Steven Rostedt wrote: > > On Thu, 18 Feb 2021 09:00:12 -0800 > > "Paul E. McKenney" <paulmck@xxxxxxxxxx> wrote: > > > > > OK, I will bite. ;-) > > > > Do I turn into a wearwolf? > > Maybe even a wash-n-wear wolf. ;-) > > > > Can the saving of console into trace buffers be easily enabled and > > > disabled within the code? > > > > Well, we do have this for ftrace: > > > > echo 'enable_event:printk:console' > events/rcu/rcu_stall_warning/trigger > > > > Would enable the printk console to be traced to the ring buffer once the > > stall is triggered, and not before hand. > > > > > If so, does enabling and disabling nest? > > > > It has a disable as well, but unfortunately its global and does not nest. > > We could always implement a percpu trigger that can nest though. > > So Sangmoon could have a module react to an RCU CPU stall warning > tracepoint by turning on tracing of console messages. If there was a > start-stop pair of RCU CPU stall warning tracepoints, he could turn it > off as well. > > Not sure if that is what Sangmoon is looking for, but it is a possibility. > > Thanx, Paul Thank you. I'm learning the new things through this review. Copying console messages is not really necessary to me. I wanted to say this tracepoint can also be used in such way for debugging purpose. What I need is that a module records the stall happening and report the stall event when kernel panic occurred. Of course, there is no detailed information there, but it helps developers to recognize that the stall has occurred in the system. The usage scenario is as follows. There is a kernel module for debugging. The module registers a probe function using register_trace_rcu_stall_warning(). When a stall warning event occurs, the module records the event into its own buffer. When a kernel panic occurs, the developers can see the report generated by the module and can also see the buffer of the module directly through Ramdump. Thanks, Sangmoon