Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-20 Thread Peter Zijlstra
On Thu, Mar 19, 2015 at 11:04:33PM +0100, Peter Zijlstra wrote: > On Thu, Mar 19, 2015 at 01:58:33PM -0700, Andrew Morton wrote: > > OK. This code is basically required to support perf/ftrace and > > modules, yes? Presumably small and space-constrained systems aren't > > using either, so they don

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-19 Thread Peter Zijlstra
On Thu, Mar 19, 2015 at 05:36:36PM -0400, Steven Rostedt wrote: > On Thu, 19 Mar 2015 13:58:33 -0700 > Andrew Morton wrote: > > > OK. This code is basically required to support perf/ftrace and > > modules, yes? Presumably small and space-constrained systems aren't > > using either, so they don'

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-19 Thread Peter Zijlstra
On Thu, Mar 19, 2015 at 01:58:33PM -0700, Andrew Morton wrote: > On Thu, 19 Mar 2015 08:25:02 +0100 Peter Zijlstra > wrote: > > > On Wed, Mar 18, 2015 at 10:14:46PM -0700, Andrew Morton wrote: > > > On Wed, 18 Mar 2015 14:36:32 +0100 Peter Zijlstra > > > wrote: > > > > > > > include/linux/rb

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-19 Thread Peter Zijlstra
On Thu, Mar 19, 2015 at 01:58:33PM -0700, Andrew Morton wrote: > OK. This code is basically required to support perf/ftrace and > modules, yes? Presumably small and space-constrained systems aren't > using either, so they don't take the hit. > > However CONFIG_MODULES systems which aren't using

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-19 Thread Steven Rostedt
On Thu, 19 Mar 2015 14:47:32 -0700 Andrew Morton wrote: > Should this be PERF_EVENTS, or PERF_EVENTS_NMI? No idea. I just whipped up a quick patch and guessed at the configs. I was trying to show other options for the solution more than to show a working patch ;-) > > Could we just keep the o

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-19 Thread Andrew Morton
On Thu, 19 Mar 2015 17:36:36 -0400 Steven Rostedt wrote: > On Thu, 19 Mar 2015 13:58:33 -0700 > Andrew Morton wrote: > > > OK. This code is basically required to support perf/ftrace and > > modules, yes? Presumably small and space-constrained systems aren't > > using either, so they don't tak

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-19 Thread Steven Rostedt
On Thu, 19 Mar 2015 17:36:36 -0400 Steven Rostedt wrote: > diff --git a/lib/rbtree_latch.c b/lib/rbtree_latch.c > new file mode 100644 > index ..13867da4f27f > --- /dev/null > +++ b/lib/rbtree_latch.c > @@ -0,0 +1,5 @@ > + > +#ifndef CONFIG_RBTREE_LATCH_INLINE > +#define RBTREE_LATCH_

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-19 Thread Steven Rostedt
On Thu, 19 Mar 2015 13:58:33 -0700 Andrew Morton wrote: > OK. This code is basically required to support perf/ftrace and > modules, yes? Presumably small and space-constrained systems aren't > using either, so they don't take the hit. > > However CONFIG_MODULES systems which aren't using perf/

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-19 Thread Andrew Morton
On Thu, 19 Mar 2015 08:25:02 +0100 Peter Zijlstra wrote: > On Wed, Mar 18, 2015 at 10:14:46PM -0700, Andrew Morton wrote: > > On Wed, 18 Mar 2015 14:36:32 +0100 Peter Zijlstra > > wrote: > > > > > include/linux/rbtree_latch.h | 223 > > > +++ > > > >

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-19 Thread Peter Zijlstra
On Wed, Mar 18, 2015 at 10:14:46PM -0700, Andrew Morton wrote: > On Wed, 18 Mar 2015 14:36:32 +0100 Peter Zijlstra > wrote: > > > include/linux/rbtree_latch.h | 223 > > +++ > > Did it really need to all be inlined? Without that you get actual function

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-18 Thread Andrew Morton
On Wed, 18 Mar 2015 14:36:32 +0100 Peter Zijlstra wrote: > include/linux/rbtree_latch.h | 223 > +++ Did it really need to all be inlined? How much of this code is unneeded on uniprocessor? -- To unsubscribe from this list: send the line "unsubscribe li

Re: [PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-18 Thread Ingo Molnar
* Peter Zijlstra wrote: > Implement a latched RB-tree in order to get unconditional RCU/lockless > lookups. Two very minor nits: > +struct latch_tree_node { > + /* > + * Because we have an array of two entries in struct latch_tree_nodes > + * its not possible to use container_of(

[PATCH 6/8] rbtree: Implement generic latch_tree

2015-03-18 Thread Peter Zijlstra
Implement a latched RB-tree in order to get unconditional RCU/lockless lookups. Cc: Mathieu Desnoyers Cc: "Paul E. McKenney" Cc: Oleg Nesterov Cc: Michel Lespinasse Cc: Andrea Arcangeli Cc: David Woodhouse Cc: Rik van Riel Signed-off-by: Peter Zijlstra (Intel) --- include/linux/rbtree_lat