Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-26 Thread Sai Prakash Ranjan
On 9/26/2018 2:10 AM, Joel Fernandes wrote: On Tue, Sep 25, 2018 at 1:39 PM, Joel Fernandes wrote: On Tue, Sep 25, 2018 at 1:37 PM, Joel Fernandes wrote: On Sun, Sep 23, 2018 at 8:33 AM, Sai Prakash Ranjan wrote: On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: On 9/22/2018 2:35 PM, Joel

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-26 Thread Sai Prakash Ranjan
On 9/26/2018 2:10 AM, Joel Fernandes wrote: On Tue, Sep 25, 2018 at 1:39 PM, Joel Fernandes wrote: On Tue, Sep 25, 2018 at 1:37 PM, Joel Fernandes wrote: On Sun, Sep 23, 2018 at 8:33 AM, Sai Prakash Ranjan wrote: On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: On 9/22/2018 2:35 PM, Joel

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-25 Thread Joel Fernandes
On Tue, Sep 25, 2018 at 1:39 PM, Joel Fernandes wrote: > On Tue, Sep 25, 2018 at 1:37 PM, Joel Fernandes wrote: >> On Sun, Sep 23, 2018 at 8:33 AM, Sai Prakash Ranjan >> wrote: >>> On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: On 9/22/2018 2:35 PM, Joel Fernandes wrote: > >

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-25 Thread Joel Fernandes
On Tue, Sep 25, 2018 at 1:39 PM, Joel Fernandes wrote: > On Tue, Sep 25, 2018 at 1:37 PM, Joel Fernandes wrote: >> On Sun, Sep 23, 2018 at 8:33 AM, Sai Prakash Ranjan >> wrote: >>> On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: On 9/22/2018 2:35 PM, Joel Fernandes wrote: > >

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-25 Thread Joel Fernandes
On Tue, Sep 25, 2018 at 1:37 PM, Joel Fernandes wrote: > On Sun, Sep 23, 2018 at 8:33 AM, Sai Prakash Ranjan > wrote: >> On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: >>> >>> On 9/22/2018 2:35 PM, Joel Fernandes wrote: On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote:

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-25 Thread Joel Fernandes
On Tue, Sep 25, 2018 at 1:37 PM, Joel Fernandes wrote: > On Sun, Sep 23, 2018 at 8:33 AM, Sai Prakash Ranjan > wrote: >> On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: >>> >>> On 9/22/2018 2:35 PM, Joel Fernandes wrote: On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote:

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-25 Thread Joel Fernandes
On Sun, Sep 23, 2018 at 8:33 AM, Sai Prakash Ranjan wrote: > On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: >> >> On 9/22/2018 2:35 PM, Joel Fernandes wrote: >>> >>> On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan >>> wrote: + + trace_seq_init(>seq); +

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-25 Thread Joel Fernandes
On Sun, Sep 23, 2018 at 8:33 AM, Sai Prakash Ranjan wrote: > On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: >> >> On 9/22/2018 2:35 PM, Joel Fernandes wrote: >>> >>> On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan >>> wrote: + + trace_seq_init(>seq); +

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-23 Thread Sai Prakash Ranjan
On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: On 9/22/2018 2:35 PM, Joel Fernandes wrote: On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote: + +   trace_seq_init(>seq); +   iter->ent = fbuffer->entry; +   event_call->event.funcs->trace(iter, 0, event); +  

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-23 Thread Sai Prakash Ranjan
On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: On 9/22/2018 2:35 PM, Joel Fernandes wrote: On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote: + +   trace_seq_init(>seq); +   iter->ent = fbuffer->entry; +   event_call->event.funcs->trace(iter, 0, event); +  

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-22 Thread Sai Prakash Ranjan
On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: On 9/22/2018 2:35 PM, Joel Fernandes wrote: On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote: Also I think this spinlock can be moved further down. OK. Something like this would suffice? {{{ spin_lock_irqsave(>buf_lock, flags);

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-22 Thread Sai Prakash Ranjan
On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: On 9/22/2018 2:35 PM, Joel Fernandes wrote: On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote: Also I think this spinlock can be moved further down. OK. Something like this would suffice? {{{ spin_lock_irqsave(>buf_lock, flags);

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-22 Thread Sai Prakash Ranjan
On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: On 9/22/2018 2:35 PM, Joel Fernandes wrote: On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote: Could you just split the pstore space into a per-cpu event buffer like we are doing for ftrace-on-pstore? Then you don't need to lock. I fear

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-22 Thread Sai Prakash Ranjan
On 9/22/2018 10:07 PM, Sai Prakash Ranjan wrote: On 9/22/2018 2:35 PM, Joel Fernandes wrote: On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote: Could you just split the pstore space into a per-cpu event buffer like we are doing for ftrace-on-pstore? Then you don't need to lock. I fear

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-22 Thread Sai Prakash Ranjan
On 9/22/2018 2:35 PM, Joel Fernandes wrote: On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote: Could you just split the pstore space into a per-cpu event buffer like we are doing for ftrace-on-pstore? Then you don't need to lock. I fear the lock contention will be apparent. The pstore

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-22 Thread Sai Prakash Ranjan
On 9/22/2018 2:35 PM, Joel Fernandes wrote: On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote: Could you just split the pstore space into a per-cpu event buffer like we are doing for ftrace-on-pstore? Then you don't need to lock. I fear the lock contention will be apparent. The pstore

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-22 Thread Joel Fernandes
On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote: > > Currently pstore has function trace support which can be > used to get the function call chain with limited data. > Event tracing has extra data which is useful to debug wide > variety of issues and is heavily used across the kernel. >

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-22 Thread Joel Fernandes
On Sat, Sep 8, 2018 at 4:28 PM Sai Prakash Ranjan wrote: > > Currently pstore has function trace support which can be > used to get the function call chain with limited data. > Event tracing has extra data which is useful to debug wide > variety of issues and is heavily used across the kernel. >

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-22 Thread Sai Prakash Ranjan
On 9/19/2018 2:43 AM, Sai Prakash Ranjan wrote: On 9/19/2018 2:14 AM, Steven Rostedt wrote: On Tue, 18 Sep 2018 23:22:48 +0530 Sai Prakash Ranjan wrote: On 9/18/2018 5:04 AM, Steven Rostedt wrote: It looks like pstore_event_call() gets called from a trace event. You can't call kmalloc()

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-22 Thread Sai Prakash Ranjan
On 9/19/2018 2:43 AM, Sai Prakash Ranjan wrote: On 9/19/2018 2:14 AM, Steven Rostedt wrote: On Tue, 18 Sep 2018 23:22:48 +0530 Sai Prakash Ranjan wrote: On 9/18/2018 5:04 AM, Steven Rostedt wrote: It looks like pstore_event_call() gets called from a trace event. You can't call kmalloc()

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-18 Thread Sai Prakash Ranjan
On 9/19/2018 2:14 AM, Steven Rostedt wrote: On Tue, 18 Sep 2018 23:22:48 +0530 Sai Prakash Ranjan wrote: On 9/18/2018 5:04 AM, Steven Rostedt wrote: It looks like pstore_event_call() gets called from a trace event. You can't call kmalloc() from one. One thing is that kmalloc has tracepoints

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-18 Thread Sai Prakash Ranjan
On 9/19/2018 2:14 AM, Steven Rostedt wrote: On Tue, 18 Sep 2018 23:22:48 +0530 Sai Prakash Ranjan wrote: On 9/18/2018 5:04 AM, Steven Rostedt wrote: It looks like pstore_event_call() gets called from a trace event. You can't call kmalloc() from one. One thing is that kmalloc has tracepoints

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-18 Thread Steven Rostedt
On Tue, 18 Sep 2018 23:22:48 +0530 Sai Prakash Ranjan wrote: > On 9/18/2018 5:04 AM, Steven Rostedt wrote: > > > > It looks like pstore_event_call() gets called from a trace event. You > > can't call kmalloc() from one. One thing is that kmalloc has > > tracepoints itself. You trace those you

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-18 Thread Steven Rostedt
On Tue, 18 Sep 2018 23:22:48 +0530 Sai Prakash Ranjan wrote: > On 9/18/2018 5:04 AM, Steven Rostedt wrote: > > > > It looks like pstore_event_call() gets called from a trace event. You > > can't call kmalloc() from one. One thing is that kmalloc has > > tracepoints itself. You trace those you

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-18 Thread Sai Prakash Ranjan
On 9/18/2018 5:04 AM, Steven Rostedt wrote: It looks like pstore_event_call() gets called from a trace event. You can't call kmalloc() from one. One thing is that kmalloc has tracepoints itself. You trace those you just entered an infinite loop. Ok will remove it in v2. But any alternative

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-18 Thread Sai Prakash Ranjan
On 9/18/2018 5:04 AM, Steven Rostedt wrote: It looks like pstore_event_call() gets called from a trace event. You can't call kmalloc() from one. One thing is that kmalloc has tracepoints itself. You trace those you just entered an infinite loop. Ok will remove it in v2. But any alternative

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-18 Thread Sai Prakash Ranjan
On 9/18/2018 4:34 AM, Steven Rostedt wrote: On Sun, 16 Sep 2018 12:37:52 +0530 Sai Prakash Ranjan wrote: Hi, Anyone here? You also just caught me from coming back from a trip. I'm looking at your patches now. -- Steve Thanks Steve, I just thought you guys might have missed the patch.

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-18 Thread Sai Prakash Ranjan
On 9/18/2018 4:34 AM, Steven Rostedt wrote: On Sun, 16 Sep 2018 12:37:52 +0530 Sai Prakash Ranjan wrote: Hi, Anyone here? You also just caught me from coming back from a trip. I'm looking at your patches now. -- Steve Thanks Steve, I just thought you guys might have missed the patch.

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Steven Rostedt
On Sun, 9 Sep 2018 01:57:03 +0530 Sai Prakash Ranjan wrote: > Signed-off-by: Sai Prakash Ranjan > --- > fs/pstore/Kconfig | 2 +- > fs/pstore/ftrace.c | 55 ++ > fs/pstore/inode.c | 4 +++ > fs/pstore/ram.c| 44

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Steven Rostedt
On Sun, 9 Sep 2018 01:57:03 +0530 Sai Prakash Ranjan wrote: > Signed-off-by: Sai Prakash Ranjan > --- > fs/pstore/Kconfig | 2 +- > fs/pstore/ftrace.c | 55 ++ > fs/pstore/inode.c | 4 +++ > fs/pstore/ram.c| 44

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Steven Rostedt
On Sun, 16 Sep 2018 12:37:52 +0530 Sai Prakash Ranjan wrote: > Hi, > > Anyone here? You also just caught me from coming back from a trip. I'm looking at your patches now. -- Steve

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Steven Rostedt
On Sun, 16 Sep 2018 12:37:52 +0530 Sai Prakash Ranjan wrote: > Hi, > > Anyone here? You also just caught me from coming back from a trip. I'm looking at your patches now. -- Steve

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Sai Prakash Ranjan
On 9/17/2018 11:08 PM, Stephen Boyd wrote: Quoting Sai Prakash Ranjan (2018-09-11 03:46:01) On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: +void notrace pstore_event_call(struct trace_event_buffer *fbuffer) +{ + struct trace_iterator *iter; + struct trace_seq *s; + struct

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Sai Prakash Ranjan
On 9/17/2018 11:08 PM, Stephen Boyd wrote: Quoting Sai Prakash Ranjan (2018-09-11 03:46:01) On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: +void notrace pstore_event_call(struct trace_event_buffer *fbuffer) +{ + struct trace_iterator *iter; + struct trace_seq *s; + struct

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Stephen Boyd
Quoting Sai Prakash Ranjan (2018-09-11 03:46:01) > On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: > > +void notrace pstore_event_call(struct trace_event_buffer *fbuffer) > > +{ > > + struct trace_iterator *iter; > > + struct trace_seq *s; > > + struct trace_event_call *event_call; > >

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Stephen Boyd
Quoting Sai Prakash Ranjan (2018-09-11 03:46:01) > On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: > > +void notrace pstore_event_call(struct trace_event_buffer *fbuffer) > > +{ > > + struct trace_iterator *iter; > > + struct trace_seq *s; > > + struct trace_event_call *event_call; > >

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Sai Prakash Ranjan
On 9/17/2018 8:24 PM, Kees Cook wrote: On Sun, Sep 16, 2018 at 6:55 AM, Joel Fernandes wrote: On Sun, Sep 16, 2018, 12:08 AM Sai Prakash Ranjan wrote: On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: Currently pstore has function trace support which can be used to get the function call chain

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Sai Prakash Ranjan
On 9/17/2018 8:24 PM, Kees Cook wrote: On Sun, Sep 16, 2018 at 6:55 AM, Joel Fernandes wrote: On Sun, Sep 16, 2018, 12:08 AM Sai Prakash Ranjan wrote: On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: Currently pstore has function trace support which can be used to get the function call chain

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Sai Prakash Ranjan
On 9/16/2018 7:25 PM, Joel Fernandes wrote: Sorry for the top post. I've been wanting to do this as well for some time. It's quite useful. I am out of office this week and away from work machine. I will take a look at your patches next week once I'm back at work. Thanks. Best, J Cool,

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Sai Prakash Ranjan
On 9/16/2018 7:25 PM, Joel Fernandes wrote: Sorry for the top post. I've been wanting to do this as well for some time. It's quite useful. I am out of office this week and away from work machine. I will take a look at your patches next week once I'm back at work. Thanks. Best, J Cool,

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Kees Cook
On Sun, Sep 16, 2018 at 6:55 AM, Joel Fernandes wrote: > On Sun, Sep 16, 2018, 12:08 AM Sai Prakash Ranjan > wrote: >> >> On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: >> > Currently pstore has function trace support which can be >> > used to get the function call chain with limited data. >> >

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-17 Thread Kees Cook
On Sun, Sep 16, 2018 at 6:55 AM, Joel Fernandes wrote: > On Sun, Sep 16, 2018, 12:08 AM Sai Prakash Ranjan > wrote: >> >> On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: >> > Currently pstore has function trace support which can be >> > used to get the function call chain with limited data. >> >

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-16 Thread Sai Prakash Ranjan
On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: Currently pstore has function trace support which can be used to get the function call chain with limited data. Event tracing has extra data which is useful to debug wide variety of issues and is heavily used across the kernel. Adding this support

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-16 Thread Sai Prakash Ranjan
On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: Currently pstore has function trace support which can be used to get the function call chain with limited data. Event tracing has extra data which is useful to debug wide variety of issues and is heavily used across the kernel. Adding this support

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-11 Thread Sai Prakash Ranjan
On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: +void notrace pstore_event_call(struct trace_event_buffer *fbuffer) +{ + struct trace_iterator *iter; + struct trace_seq *s; + struct trace_event_call *event_call; + struct pstore_record record; + struct trace_event

Re: [PATCH 2/6] pstore: Add event tracing support

2018-09-11 Thread Sai Prakash Ranjan
On 9/9/2018 1:57 AM, Sai Prakash Ranjan wrote: +void notrace pstore_event_call(struct trace_event_buffer *fbuffer) +{ + struct trace_iterator *iter; + struct trace_seq *s; + struct trace_event_call *event_call; + struct pstore_record record; + struct trace_event

[PATCH 2/6] pstore: Add event tracing support

2018-09-08 Thread Sai Prakash Ranjan
Currently pstore has function trace support which can be used to get the function call chain with limited data. Event tracing has extra data which is useful to debug wide variety of issues and is heavily used across the kernel. Adding this support to pstore can be very helpful to debug different

[PATCH 2/6] pstore: Add event tracing support

2018-09-08 Thread Sai Prakash Ranjan
Currently pstore has function trace support which can be used to get the function call chain with limited data. Event tracing has extra data which is useful to debug wide variety of issues and is heavily used across the kernel. Adding this support to pstore can be very helpful to debug different