Re: [PATCH 1/5] rcusync: introduce struct rcu_sync_ops

2013-10-08 Thread Paul E. McKenney
On Tue, Oct 08, 2013 at 05:33:25PM +0200, Oleg Nesterov wrote: > On 10/08, Peter Zijlstra wrote: > > > > I think Linus meant to have rcu_sync_{enter,exit} as inlines with a > > const enum argument for the gp_type. > > > > That said; yes that will generate better code, but also more code, and > > li

Re: [PATCH 1/5] rcusync: introduce struct rcu_sync_ops

2013-10-08 Thread Oleg Nesterov
On 10/08, Peter Zijlstra wrote: > > I think Linus meant to have rcu_sync_{enter,exit} as inlines with a > const enum argument for the gp_type. > > That said; yes that will generate better code, but also more code, and > like Steven already argued performance isn't really an issue here since > we're

Re: [PATCH 1/5] rcusync: introduce struct rcu_sync_ops

2013-10-08 Thread Peter Zijlstra
On Sat, Oct 05, 2013 at 07:17:46PM +0200, Oleg Nesterov wrote: > To me the annoying part is that this patch exports rcu_sync_ops*. > We can add "enum rcu_sync_type rcu_sync_struct->gp_type" instead, > see the patch below. But then the next "add the CONFIG_PROVE_RCU > checks" needs to uninline rcu_s

Re: [PATCH 1/5] rcusync: introduce struct rcu_sync_ops

2013-10-05 Thread Oleg Nesterov
On 10/04, Peter Zijlstra wrote: > > On Fri, Oct 04, 2013 at 12:38:37PM -0700, Linus Torvalds wrote: > > On Fri, Oct 4, 2013 at 12:30 PM, Steven Rostedt wrote: > > > > > > As all the rcu_synchronization() methods (on non UP) are quite > > > expensive, I doubt that this optimization is worth anythin

Re: [PATCH 1/5] rcusync: introduce struct rcu_sync_ops

2013-10-05 Thread Oleg Nesterov
On 10/04, Linus Torvalds wrote: > > On Fri, Oct 4, 2013 at 12:30 PM, Steven Rostedt wrote: > > > > As all the rcu_synchronization() methods (on non UP) are quite > > expensive, I doubt that this optimization is worth anything. > > Maybe. It just annoys me, because afaik, the function that gets cal

Re: [PATCH 1/5] rcusync: introduce struct rcu_sync_ops

2013-10-04 Thread Peter Zijlstra
On Fri, Oct 04, 2013 at 12:38:37PM -0700, Linus Torvalds wrote: > On Fri, Oct 4, 2013 at 12:30 PM, Steven Rostedt wrote: > > > > As all the rcu_synchronization() methods (on non UP) are quite > > expensive, I doubt that this optimization is worth anything. > > Maybe. It just annoys me, because af

Re: [PATCH 1/5] rcusync: introduce struct rcu_sync_ops

2013-10-04 Thread Linus Torvalds
On Fri, Oct 4, 2013 at 12:30 PM, Steven Rostedt wrote: > > As all the rcu_synchronization() methods (on non UP) are quite > expensive, I doubt that this optimization is worth anything. Maybe. It just annoys me, because afaik, the function that gets called is always static per callsite.

Re: [PATCH 1/5] rcusync: introduce struct rcu_sync_ops

2013-10-04 Thread Steven Rostedt
On Fri, 4 Oct 2013 12:12:25 -0700 Linus Torvalds wrote: > - together with using a few inline functions, suddenly the "indirect" > jumps through this type descriptor end up actually being nice direct > compile-time constants: iow, they get turned into direct jumps. As all the rcu_synchronizatio

Re: [PATCH 1/5] rcusync: introduce struct rcu_sync_ops

2013-10-04 Thread Oleg Nesterov
On 10/04, Linus Torvalds wrote: > > On Fri, Oct 4, 2013 at 11:46 AM, Oleg Nesterov wrote: > > Add the new struct rcu_sync_ops which holds sync/call methods, and > > turn the function pointers in rcu_sync_struct into the single pointer > > to struct rcu_sync_ops. > > > > +struct rcu_sync_ops { > >

Re: [PATCH 1/5] rcusync: introduce struct rcu_sync_ops

2013-10-04 Thread Linus Torvalds
On Fri, Oct 4, 2013 at 11:46 AM, Oleg Nesterov wrote: > Add the new struct rcu_sync_ops which holds sync/call methods, and > turn the function pointers in rcu_sync_struct into the single pointer > to struct rcu_sync_ops. > > +struct rcu_sync_ops { > + void (*sync)(void); > + void (*cal