Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-30 Thread Joel Fernandes
On Wed, Apr 18, 2018 at 2:02 AM Masami Hiramatsu wrote: > On Mon, 16 Apr 2018 21:07:47 -0700 > Joel Fernandes wrote: > > With TRACE_IRQFLAGS, we call trace_ API too many times. We don't need > > to if local_irq_restore or local_irq_save didn't actually

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-30 Thread Joel Fernandes
On Wed, Apr 18, 2018 at 2:02 AM Masami Hiramatsu wrote: > On Mon, 16 Apr 2018 21:07:47 -0700 > Joel Fernandes wrote: > > With TRACE_IRQFLAGS, we call trace_ API too many times. We don't need > > to if local_irq_restore or local_irq_save didn't actually do anything. > > > > This gives around a

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-26 Thread Mathieu Desnoyers
- On Apr 26, 2018, at 11:03 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Apr 25, 2018, at 6:51 PM, rostedt rost...@goodmis.org wrote: > >> On Wed, 25 Apr 2018 17:40:56 -0400 (EDT) >> Mathieu Desnoyers wrote: >> >>> One problem with

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-26 Thread Mathieu Desnoyers
- On Apr 26, 2018, at 11:03 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Apr 25, 2018, at 6:51 PM, rostedt rost...@goodmis.org wrote: > >> On Wed, 25 Apr 2018 17:40:56 -0400 (EDT) >> Mathieu Desnoyers wrote: >> >>> One problem with your approach is that you can

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-26 Thread Paul E. McKenney
On Thu, Apr 26, 2018 at 11:13:16AM -0400, Mathieu Desnoyers wrote: > - On Apr 25, 2018, at 7:13 PM, Joel Fernandes joe...@google.com wrote: > > > Hi Mathieu, > > > > On Wed, Apr 25, 2018 at 2:40 PM, Mathieu Desnoyers > > wrote: > >> - On Apr 25, 2018, at

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-26 Thread Paul E. McKenney
On Thu, Apr 26, 2018 at 11:13:16AM -0400, Mathieu Desnoyers wrote: > - On Apr 25, 2018, at 7:13 PM, Joel Fernandes joe...@google.com wrote: > > > Hi Mathieu, > > > > On Wed, Apr 25, 2018 at 2:40 PM, Mathieu Desnoyers > > wrote: > >> - On Apr 25, 2018, at 5:27 PM, Joel Fernandes

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-26 Thread Joel Fernandes
On Thu, Apr 26, 2018 at 8:13 AM, Mathieu Desnoyers wrote: [...] >>> Regarding the name, I'm OK with having something along the lines of >>> trace_*event*_blocking or such. Please don't use "srcu" or other naming >>> that is explicitly tied to the underlying

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-26 Thread Joel Fernandes
On Thu, Apr 26, 2018 at 8:13 AM, Mathieu Desnoyers wrote: [...] >>> Regarding the name, I'm OK with having something along the lines of >>> trace_*event*_blocking or such. Please don't use "srcu" or other naming >>> that is explicitly tied to the underlying mechanism used internally >>> however:

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-26 Thread Mathieu Desnoyers
- On Apr 25, 2018, at 7:13 PM, Joel Fernandes joe...@google.com wrote: > Hi Mathieu, > > On Wed, Apr 25, 2018 at 2:40 PM, Mathieu Desnoyers > wrote: >> - On Apr 25, 2018, at 5:27 PM, Joel Fernandes joe...@google.com wrote: >> >>> On Tue, Apr 24, 2018 at

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-26 Thread Mathieu Desnoyers
- On Apr 25, 2018, at 7:13 PM, Joel Fernandes joe...@google.com wrote: > Hi Mathieu, > > On Wed, Apr 25, 2018 at 2:40 PM, Mathieu Desnoyers > wrote: >> - On Apr 25, 2018, at 5:27 PM, Joel Fernandes joe...@google.com wrote: >> >>> On Tue, Apr 24, 2018 at 9:20 PM, Paul E. McKenney >>>

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-26 Thread Mathieu Desnoyers
- On Apr 25, 2018, at 6:51 PM, rostedt rost...@goodmis.org wrote: > On Wed, 25 Apr 2018 17:40:56 -0400 (EDT) > Mathieu Desnoyers wrote: > >> One problem with your approach is that you can have multiple callers >> for the same tracepoint name, where some could

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-26 Thread Mathieu Desnoyers
- On Apr 25, 2018, at 6:51 PM, rostedt rost...@goodmis.org wrote: > On Wed, 25 Apr 2018 17:40:56 -0400 (EDT) > Mathieu Desnoyers wrote: > >> One problem with your approach is that you can have multiple callers >> for the same tracepoint name, where some could be non-preemptible and >>

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Joel Fernandes
On Sun, Apr 22, 2018 at 8:19 PM, Paul E. McKenney wrote: > On Sun, Apr 22, 2018 at 06:14:18PM -0700, Joel Fernandes wrote: [...] >> I narrowed the performance hit down to the call to >> rcu_irq_enter_irqson() and rcu_irq_exit_irqson() in __DO_TRACE. >> Commenting these

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Joel Fernandes
On Sun, Apr 22, 2018 at 8:19 PM, Paul E. McKenney wrote: > On Sun, Apr 22, 2018 at 06:14:18PM -0700, Joel Fernandes wrote: [...] >> I narrowed the performance hit down to the call to >> rcu_irq_enter_irqson() and rcu_irq_exit_irqson() in __DO_TRACE. >> Commenting these 2 functions brings the perf

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Joel Fernandes
Hi Mathieu, On Wed, Apr 25, 2018 at 2:40 PM, Mathieu Desnoyers wrote: > - On Apr 25, 2018, at 5:27 PM, Joel Fernandes joe...@google.com wrote: > >> On Tue, Apr 24, 2018 at 9:20 PM, Paul E. McKenney >> wrote: >> [..] > >

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Joel Fernandes
Hi Mathieu, On Wed, Apr 25, 2018 at 2:40 PM, Mathieu Desnoyers wrote: > - On Apr 25, 2018, at 5:27 PM, Joel Fernandes joe...@google.com wrote: > >> On Tue, Apr 24, 2018 at 9:20 PM, Paul E. McKenney >> wrote: >> [..] > > Sounds good, thanks. > > Also I found the reason

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Steven Rostedt
On Wed, 25 Apr 2018 17:40:56 -0400 (EDT) Mathieu Desnoyers wrote: > One problem with your approach is that you can have multiple callers > for the same tracepoint name, where some could be non-preemptible and > others blocking. Also, there is then no clear way for

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Steven Rostedt
On Wed, 25 Apr 2018 17:40:56 -0400 (EDT) Mathieu Desnoyers wrote: > One problem with your approach is that you can have multiple callers > for the same tracepoint name, where some could be non-preemptible and > others blocking. Also, there is then no clear way for the callback > registration API

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Mathieu Desnoyers
- On Apr 25, 2018, at 5:27 PM, Joel Fernandes joe...@google.com wrote: > On Tue, Apr 24, 2018 at 9:20 PM, Paul E. McKenney > wrote: > [..] >>> > >>> > Sounds good, thanks. >>> > >>> > Also I found the reason for my boot issue. It was because the >>> >

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Mathieu Desnoyers
- On Apr 25, 2018, at 5:27 PM, Joel Fernandes joe...@google.com wrote: > On Tue, Apr 24, 2018 at 9:20 PM, Paul E. McKenney > wrote: > [..] >>> > >>> > Sounds good, thanks. >>> > >>> > Also I found the reason for my boot issue. It was because the >>> > init_srcu_struct in the prototype was

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Paul E. McKenney
On Wed, Apr 25, 2018 at 02:27:08PM -0700, Joel Fernandes wrote: > On Tue, Apr 24, 2018 at 9:20 PM, Paul E. McKenney > wrote: > [..] > >> > > >> > Sounds good, thanks. > >> > > >> > Also I found the reason for my boot issue. It was because the > >> > init_srcu_struct in

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Paul E. McKenney
On Wed, Apr 25, 2018 at 02:27:08PM -0700, Joel Fernandes wrote: > On Tue, Apr 24, 2018 at 9:20 PM, Paul E. McKenney > wrote: > [..] > >> > > >> > Sounds good, thanks. > >> > > >> > Also I found the reason for my boot issue. It was because the > >> > init_srcu_struct in the prototype was being

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Joel Fernandes
On Tue, Apr 24, 2018 at 9:20 PM, Paul E. McKenney wrote: [..] >> > >> > Sounds good, thanks. >> > >> > Also I found the reason for my boot issue. It was because the >> > init_srcu_struct in the prototype was being done in an initcall. >> > Instead if I do it in

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-25 Thread Joel Fernandes
On Tue, Apr 24, 2018 at 9:20 PM, Paul E. McKenney wrote: [..] >> > >> > Sounds good, thanks. >> > >> > Also I found the reason for my boot issue. It was because the >> > init_srcu_struct in the prototype was being done in an initcall. >> > Instead if I do it in start_kernel before the tracepoint

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 05:10:49PM -0700, Paul E. McKenney wrote: > On Tue, Apr 24, 2018 at 04:46:54PM -0700, Joel Fernandes wrote: > > > > > > On 04/24/2018 04:21 PM, Mathieu Desnoyers wrote: > > >- On Apr 24, 2018, at 2:59 PM, Joel Fernandes joe...@google.com wrote: > > >>On Tue, Apr 24,

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 05:10:49PM -0700, Paul E. McKenney wrote: > On Tue, Apr 24, 2018 at 04:46:54PM -0700, Joel Fernandes wrote: > > > > > > On 04/24/2018 04:21 PM, Mathieu Desnoyers wrote: > > >- On Apr 24, 2018, at 2:59 PM, Joel Fernandes joe...@google.com wrote: > > >>On Tue, Apr 24,

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 04:46:54PM -0700, Joel Fernandes wrote: > > > On 04/24/2018 04:21 PM, Mathieu Desnoyers wrote: > >- On Apr 24, 2018, at 2:59 PM, Joel Fernandes joe...@google.com wrote: > >>On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney > >> wrote: >

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 04:46:54PM -0700, Joel Fernandes wrote: > > > On 04/24/2018 04:21 PM, Mathieu Desnoyers wrote: > >- On Apr 24, 2018, at 2:59 PM, Joel Fernandes joe...@google.com wrote: > >>On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney > >> wrote: > >>>On Tue, Apr 24, 2018 at

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Joel Fernandes
On 04/24/2018 04:21 PM, Mathieu Desnoyers wrote: - On Apr 24, 2018, at 2:59 PM, Joel Fernandes joe...@google.com wrote: On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney wrote: On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: On Tue, Apr

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Joel Fernandes
On 04/24/2018 04:21 PM, Mathieu Desnoyers wrote: - On Apr 24, 2018, at 2:59 PM, Joel Fernandes joe...@google.com wrote: On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney wrote: On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: On Tue, Apr 24, 2018 at 10:26:58AM -0700,

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Mathieu Desnoyers
- On Apr 24, 2018, at 2:59 PM, Joel Fernandes joe...@google.com wrote: > Hi Paul, > > On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney > wrote: >> On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: >>> On Tue, Apr 24, 2018 at 10:26:58AM -0700,

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Mathieu Desnoyers
- On Apr 24, 2018, at 2:59 PM, Joel Fernandes joe...@google.com wrote: > Hi Paul, > > On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney > wrote: >> On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: >>> On Tue, Apr 24, 2018 at 10:26:58AM -0700, Paul E. McKenney wrote: >>> >

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Joel Fernandes
On Tue, Apr 24, 2018 at 12:09 PM, Paul E. McKenney wrote: > On Tue, Apr 24, 2018 at 11:59:32AM -0700, Joel Fernandes wrote: >> Hi Paul, >> >> On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney >> wrote: >> > On Tue, Apr 24, 2018 at

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Joel Fernandes
On Tue, Apr 24, 2018 at 12:09 PM, Paul E. McKenney wrote: > On Tue, Apr 24, 2018 at 11:59:32AM -0700, Joel Fernandes wrote: >> Hi Paul, >> >> On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney >> wrote: >> > On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: >> >> On Tue, Apr 24,

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 11:59:32AM -0700, Joel Fernandes wrote: > Hi Paul, > > On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney > wrote: > > On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: > >> On Tue, Apr 24, 2018 at 10:26:58AM -0700, Paul E.

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 11:59:32AM -0700, Joel Fernandes wrote: > Hi Paul, > > On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney > wrote: > > On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: > >> On Tue, Apr 24, 2018 at 10:26:58AM -0700, Paul E. McKenney wrote: > >> > On Tue,

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Joel Fernandes
On Tue, Apr 24, 2018 at 11:59 AM, Joel Fernandes wrote: [...] >>> > > By the way is there any limitation on using SRCU too early during >>> > > boot? I backported Mathieu's srcu tracepoint patches but the kernel >>> > > hangs pretty early in the boot. I register lockdep probes

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Joel Fernandes
On Tue, Apr 24, 2018 at 11:59 AM, Joel Fernandes wrote: [...] >>> > > By the way is there any limitation on using SRCU too early during >>> > > boot? I backported Mathieu's srcu tracepoint patches but the kernel >>> > > hangs pretty early in the boot. I register lockdep probes in >>> > >

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Joel Fernandes
Hi Paul, On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney wrote: > On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: >> On Tue, Apr 24, 2018 at 10:26:58AM -0700, Paul E. McKenney wrote: >> > On Tue, Apr 24, 2018 at 09:01:34AM -0700, Joel Fernandes

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Joel Fernandes
Hi Paul, On Tue, Apr 24, 2018 at 11:26 AM, Paul E. McKenney wrote: > On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: >> On Tue, Apr 24, 2018 at 10:26:58AM -0700, Paul E. McKenney wrote: >> > On Tue, Apr 24, 2018 at 09:01:34AM -0700, Joel Fernandes wrote: >> > > On Tue, Apr 24,

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: > On Tue, Apr 24, 2018 at 10:26:58AM -0700, Paul E. McKenney wrote: > > On Tue, Apr 24, 2018 at 09:01:34AM -0700, Joel Fernandes wrote: > > > On Tue, Apr 24, 2018 at 8:56 AM, Paul E. McKenney > > >

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 11:23:02AM -0700, Paul E. McKenney wrote: > On Tue, Apr 24, 2018 at 10:26:58AM -0700, Paul E. McKenney wrote: > > On Tue, Apr 24, 2018 at 09:01:34AM -0700, Joel Fernandes wrote: > > > On Tue, Apr 24, 2018 at 8:56 AM, Paul E. McKenney > > > wrote: > > > > On Mon, Apr 23,

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 10:26:58AM -0700, Paul E. McKenney wrote: > On Tue, Apr 24, 2018 at 09:01:34AM -0700, Joel Fernandes wrote: > > On Tue, Apr 24, 2018 at 8:56 AM, Paul E. McKenney > > wrote: > > > On Mon, Apr 23, 2018 at 05:22:44PM -0400, Steven Rostedt wrote: >

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 10:26:58AM -0700, Paul E. McKenney wrote: > On Tue, Apr 24, 2018 at 09:01:34AM -0700, Joel Fernandes wrote: > > On Tue, Apr 24, 2018 at 8:56 AM, Paul E. McKenney > > wrote: > > > On Mon, Apr 23, 2018 at 05:22:44PM -0400, Steven Rostedt wrote: > > >> On Mon, 23 Apr 2018

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 09:01:34AM -0700, Joel Fernandes wrote: > On Tue, Apr 24, 2018 at 8:56 AM, Paul E. McKenney > wrote: > > On Mon, Apr 23, 2018 at 05:22:44PM -0400, Steven Rostedt wrote: > >> On Mon, 23 Apr 2018 13:12:21 -0400 (EDT) > >> Mathieu Desnoyers

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Tue, Apr 24, 2018 at 09:01:34AM -0700, Joel Fernandes wrote: > On Tue, Apr 24, 2018 at 8:56 AM, Paul E. McKenney > wrote: > > On Mon, Apr 23, 2018 at 05:22:44PM -0400, Steven Rostedt wrote: > >> On Mon, 23 Apr 2018 13:12:21 -0400 (EDT) > >> Mathieu Desnoyers wrote: > >> > >> > >> > I'm

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Joel Fernandes
On Tue, Apr 24, 2018 at 8:56 AM, Paul E. McKenney wrote: > On Mon, Apr 23, 2018 at 05:22:44PM -0400, Steven Rostedt wrote: >> On Mon, 23 Apr 2018 13:12:21 -0400 (EDT) >> Mathieu Desnoyers wrote: >> >> >> > I'm inclined to explicitly

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Joel Fernandes
On Tue, Apr 24, 2018 at 8:56 AM, Paul E. McKenney wrote: > On Mon, Apr 23, 2018 at 05:22:44PM -0400, Steven Rostedt wrote: >> On Mon, 23 Apr 2018 13:12:21 -0400 (EDT) >> Mathieu Desnoyers wrote: >> >> >> > I'm inclined to explicitly declare the tracepoints with their given >> > synchronization

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Mon, Apr 23, 2018 at 05:22:44PM -0400, Steven Rostedt wrote: > On Mon, 23 Apr 2018 13:12:21 -0400 (EDT) > Mathieu Desnoyers wrote: > > > > I'm inclined to explicitly declare the tracepoints with their given > > synchronization method. Tracepoint probe callback

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-24 Thread Paul E. McKenney
On Mon, Apr 23, 2018 at 05:22:44PM -0400, Steven Rostedt wrote: > On Mon, 23 Apr 2018 13:12:21 -0400 (EDT) > Mathieu Desnoyers wrote: > > > > I'm inclined to explicitly declare the tracepoints with their given > > synchronization method. Tracepoint probe callback functions for currently > >

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Steven Rostedt
On Mon, 23 Apr 2018 13:12:21 -0400 (EDT) Mathieu Desnoyers wrote: > I'm inclined to explicitly declare the tracepoints with their given > synchronization method. Tracepoint probe callback functions for currently > existing tracepoints expect to have preemption

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Steven Rostedt
On Mon, 23 Apr 2018 13:12:21 -0400 (EDT) Mathieu Desnoyers wrote: > I'm inclined to explicitly declare the tracepoints with their given > synchronization method. Tracepoint probe callback functions for currently > existing tracepoints expect to have preemption disabled when invoked. > This

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Joel Fernandes
Hi Mathieu, On Mon, Apr 23, 2018 at 10:12 AM, Mathieu Desnoyers wrote: > - On Apr 23, 2018, at 12:18 PM, rostedt rost...@goodmis.org wrote: > >> On Mon, 23 Apr 2018 10:59:43 -0400 (EDT) >> Mathieu Desnoyers wrote: >> >>> The

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Joel Fernandes
Hi Mathieu, On Mon, Apr 23, 2018 at 10:12 AM, Mathieu Desnoyers wrote: > - On Apr 23, 2018, at 12:18 PM, rostedt rost...@goodmis.org wrote: > >> On Mon, 23 Apr 2018 10:59:43 -0400 (EDT) >> Mathieu Desnoyers wrote: >> >>> The main open question here is whether we want one SRCU grace period

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Mathieu Desnoyers
- On Apr 23, 2018, at 12:18 PM, rostedt rost...@goodmis.org wrote: > On Mon, 23 Apr 2018 10:59:43 -0400 (EDT) > Mathieu Desnoyers wrote: > >> The main open question here is whether we want one SRCU grace period >> domain per SRCU tracepoint definition, or

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Mathieu Desnoyers
- On Apr 23, 2018, at 12:18 PM, rostedt rost...@goodmis.org wrote: > On Mon, 23 Apr 2018 10:59:43 -0400 (EDT) > Mathieu Desnoyers wrote: > >> The main open question here is whether we want one SRCU grace period >> domain per SRCU tracepoint definition, or just one SRCU domain for all >>

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Steven Rostedt
On Mon, 23 Apr 2018 10:59:43 -0400 (EDT) Mathieu Desnoyers wrote: > The main open question here is whether we want one SRCU grace period > domain per SRCU tracepoint definition, or just one SRCU domain for all > SRCU tracepoints would be fine. > > I'm not sure

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Steven Rostedt
On Mon, 23 Apr 2018 10:59:43 -0400 (EDT) Mathieu Desnoyers wrote: > The main open question here is whether we want one SRCU grace period > domain per SRCU tracepoint definition, or just one SRCU domain for all > SRCU tracepoints would be fine. > > I'm not sure what we would gain by having the

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Joel Fernandes
Hi, On Mon, Apr 23, 2018 at 7:53 AM, Steven Rostedt wrote: > On Mon, 23 Apr 2018 10:31:28 -0400 (EDT) > Mathieu Desnoyers wrote: [..] >> I would be tempted to proceed carefully and introduce a new kind of SRCU >> tracepoint rather than

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Joel Fernandes
Hi, On Mon, Apr 23, 2018 at 7:53 AM, Steven Rostedt wrote: > On Mon, 23 Apr 2018 10:31:28 -0400 (EDT) > Mathieu Desnoyers wrote: [..] >> I would be tempted to proceed carefully and introduce a new kind of SRCU >> tracepoint rather than changing all existing ones from sched-rcu to SRCU >>

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Paul E. McKenney
On Mon, Apr 23, 2018 at 10:59:43AM -0400, Mathieu Desnoyers wrote: > - On Apr 23, 2018, at 10:53 AM, rostedt rost...@goodmis.org wrote: > > > On Mon, 23 Apr 2018 10:31:28 -0400 (EDT) > > Mathieu Desnoyers wrote: > > > >> I've been wanting to introduce an

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Paul E. McKenney
On Mon, Apr 23, 2018 at 10:59:43AM -0400, Mathieu Desnoyers wrote: > - On Apr 23, 2018, at 10:53 AM, rostedt rost...@goodmis.org wrote: > > > On Mon, 23 Apr 2018 10:31:28 -0400 (EDT) > > Mathieu Desnoyers wrote: > > > >> I've been wanting to introduce an alternative tracepoint

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Mathieu Desnoyers
- On Apr 23, 2018, at 10:53 AM, rostedt rost...@goodmis.org wrote: > On Mon, 23 Apr 2018 10:31:28 -0400 (EDT) > Mathieu Desnoyers wrote: > >> I've been wanting to introduce an alternative tracepoint instrumentation >> "flavor" for e.g. system call entry/exit

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Mathieu Desnoyers
- On Apr 23, 2018, at 10:53 AM, rostedt rost...@goodmis.org wrote: > On Mon, 23 Apr 2018 10:31:28 -0400 (EDT) > Mathieu Desnoyers wrote: > >> I've been wanting to introduce an alternative tracepoint instrumentation >> "flavor" for e.g. system call entry/exit which rely on SRCU rather than

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Steven Rostedt
On Mon, 23 Apr 2018 10:31:28 -0400 (EDT) Mathieu Desnoyers wrote: > I've been wanting to introduce an alternative tracepoint instrumentation > "flavor" for e.g. system call entry/exit which rely on SRCU rather than > sched-rcu (preempt-off). This would allow

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Steven Rostedt
On Mon, 23 Apr 2018 10:31:28 -0400 (EDT) Mathieu Desnoyers wrote: > I've been wanting to introduce an alternative tracepoint instrumentation > "flavor" for e.g. system call entry/exit which rely on SRCU rather than > sched-rcu (preempt-off). This would allow taking faults within the >

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Mathieu Desnoyers
- On Apr 22, 2018, at 11:19 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: > On Sun, Apr 22, 2018 at 06:14:18PM -0700, Joel Fernandes wrote: >> On Fri, Apr 20, 2018 at 12:07 AM, Joel Fernandes wrote: >> > Hi, >> > >> > Thanks Matsami and Namhyung for the

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-23 Thread Mathieu Desnoyers
- On Apr 22, 2018, at 11:19 PM, Paul E. McKenney paul...@linux.vnet.ibm.com wrote: > On Sun, Apr 22, 2018 at 06:14:18PM -0700, Joel Fernandes wrote: >> On Fri, Apr 20, 2018 at 12:07 AM, Joel Fernandes wrote: >> > Hi, >> > >> > Thanks Matsami and Namhyung for the suggestions! >> > >> > On

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-22 Thread Paul E. McKenney
On Sun, Apr 22, 2018 at 06:14:18PM -0700, Joel Fernandes wrote: > On Fri, Apr 20, 2018 at 12:07 AM, Joel Fernandes wrote: > > Hi, > > > > Thanks Matsami and Namhyung for the suggestions! > > > > On Wed, Apr 18, 2018 at 10:43 PM, Namhyung Kim wrote: > >> On

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-22 Thread Paul E. McKenney
On Sun, Apr 22, 2018 at 06:14:18PM -0700, Joel Fernandes wrote: > On Fri, Apr 20, 2018 at 12:07 AM, Joel Fernandes wrote: > > Hi, > > > > Thanks Matsami and Namhyung for the suggestions! > > > > On Wed, Apr 18, 2018 at 10:43 PM, Namhyung Kim wrote: > >> On Wed, Apr 18, 2018 at 06:02:50PM +0900,

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-22 Thread Joel Fernandes
On Fri, Apr 20, 2018 at 12:07 AM, Joel Fernandes wrote: > Hi, > > Thanks Matsami and Namhyung for the suggestions! > > On Wed, Apr 18, 2018 at 10:43 PM, Namhyung Kim wrote: >> On Wed, Apr 18, 2018 at 06:02:50PM +0900, Masami Hiramatsu wrote: >>> On Mon, 16

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-22 Thread Joel Fernandes
On Fri, Apr 20, 2018 at 12:07 AM, Joel Fernandes wrote: > Hi, > > Thanks Matsami and Namhyung for the suggestions! > > On Wed, Apr 18, 2018 at 10:43 PM, Namhyung Kim wrote: >> On Wed, Apr 18, 2018 at 06:02:50PM +0900, Masami Hiramatsu wrote: >>> On Mon, 16 Apr 2018 21:07:47 -0700 >>> Joel

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-20 Thread Joel Fernandes
Hi, Thanks Matsami and Namhyung for the suggestions! On Wed, Apr 18, 2018 at 10:43 PM, Namhyung Kim wrote: > On Wed, Apr 18, 2018 at 06:02:50PM +0900, Masami Hiramatsu wrote: >> On Mon, 16 Apr 2018 21:07:47 -0700 >> Joel Fernandes wrote: >> >> > With

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-20 Thread Joel Fernandes
Hi, Thanks Matsami and Namhyung for the suggestions! On Wed, Apr 18, 2018 at 10:43 PM, Namhyung Kim wrote: > On Wed, Apr 18, 2018 at 06:02:50PM +0900, Masami Hiramatsu wrote: >> On Mon, 16 Apr 2018 21:07:47 -0700 >> Joel Fernandes wrote: >> >> > With TRACE_IRQFLAGS, we call trace_ API too many

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-18 Thread Namhyung Kim
On Wed, Apr 18, 2018 at 06:02:50PM +0900, Masami Hiramatsu wrote: > On Mon, 16 Apr 2018 21:07:47 -0700 > Joel Fernandes wrote: > > > With TRACE_IRQFLAGS, we call trace_ API too many times. We don't need > > to if local_irq_restore or local_irq_save didn't actually do anything.

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-18 Thread Namhyung Kim
On Wed, Apr 18, 2018 at 06:02:50PM +0900, Masami Hiramatsu wrote: > On Mon, 16 Apr 2018 21:07:47 -0700 > Joel Fernandes wrote: > > > With TRACE_IRQFLAGS, we call trace_ API too many times. We don't need > > to if local_irq_restore or local_irq_save didn't actually do anything. > > > > This

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-18 Thread Masami Hiramatsu
On Mon, 16 Apr 2018 21:07:47 -0700 Joel Fernandes wrote: > With TRACE_IRQFLAGS, we call trace_ API too many times. We don't need > to if local_irq_restore or local_irq_save didn't actually do anything. > > This gives around a 4% improvement in performance when doing the >

Re: [RFC v4 3/4] irqflags: Avoid unnecessary calls to trace_ if you can

2018-04-18 Thread Masami Hiramatsu
On Mon, 16 Apr 2018 21:07:47 -0700 Joel Fernandes wrote: > With TRACE_IRQFLAGS, we call trace_ API too many times. We don't need > to if local_irq_restore or local_irq_save didn't actually do anything. > > This gives around a 4% improvement in performance when doing the > following command: