Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-18 Thread Tom Zanussi
On Sat, 2015-07-18 at 02:40 +, Mathieu Desnoyers wrote: > - On Jul 17, 2015, at 7:44 PM, Tom Zanussi tom.zanu...@linux.intel.com > wrote: > > > On Fri, 2015-07-17 at 15:48 +, Mathieu Desnoyers wrote: > >> - On Jul 16, 2015, at 9:35 PM, Tom Zanussi tom.zanu...@linux.intel.com > >>

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-17 Thread Mathieu Desnoyers
- On Jul 17, 2015, at 7:44 PM, Tom Zanussi tom.zanu...@linux.intel.com wrote: > On Fri, 2015-07-17 at 15:48 +, Mathieu Desnoyers wrote: >> - On Jul 16, 2015, at 9:35 PM, Tom Zanussi tom.zanu...@linux.intel.com >> wrote: >> >> > Hi Mathieu, >> > >> > On Thu, 2015-07-16 at 23:25 +

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-17 Thread Tom Zanussi
On Fri, 2015-07-17 at 15:48 +, Mathieu Desnoyers wrote: > - On Jul 16, 2015, at 9:35 PM, Tom Zanussi tom.zanu...@linux.intel.com > wrote: > > > Hi Mathieu, > > > > On Thu, 2015-07-16 at 23:25 +, Mathieu Desnoyers wrote: > >> * Tom Zanussi wrote: > >> >> Add tracing_map, a special-pur

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-17 Thread Mathieu Desnoyers
- On Jul 16, 2015, at 9:35 PM, Tom Zanussi tom.zanu...@linux.intel.com wrote: > Hi Mathieu, > > On Thu, 2015-07-16 at 23:25 +, Mathieu Desnoyers wrote: >> * Tom Zanussi wrote: >> >> Add tracing_map, a special-purpose lock-free map for tracing. >> >> >> >> tracing_map is designed to aggr

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-16 Thread Tom Zanussi
On Fri, 2015-07-17 at 00:32 +0200, Peter Zijlstra wrote: > On Thu, Jul 16, 2015 at 04:41:45PM -0500, Tom Zanussi wrote: > > On Thu, 2015-07-16 at 19:49 +0200, Peter Zijlstra wrote: > > > On Thu, Jul 16, 2015 at 12:22:40PM -0500, Tom Zanussi wrote: > > > > + for (i = 0; i < elt->map->n_fields;

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-16 Thread Tom Zanussi
Hi Mathieu, On Thu, 2015-07-16 at 23:25 +, Mathieu Desnoyers wrote: > * Tom Zanussi wrote: > >> Add tracing_map, a special-purpose lock-free map for tracing. > >> > >> tracing_map is designed to aggregate or 'sum' one or more values > >> associated with a specific object of type tracing_map_e

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-16 Thread Mathieu Desnoyers
* Tom Zanussi wrote: >> Add tracing_map, a special-purpose lock-free map for tracing. >> >> tracing_map is designed to aggregate or 'sum' one or more values >> associated with a specific object of type tracing_map_elt, which >> is associated by the map to a given key. >> >> It provides various ho

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-16 Thread Peter Zijlstra
On Thu, Jul 16, 2015 at 04:41:45PM -0500, Tom Zanussi wrote: > On Thu, 2015-07-16 at 19:49 +0200, Peter Zijlstra wrote: > > On Thu, Jul 16, 2015 at 12:22:40PM -0500, Tom Zanussi wrote: > > > + for (i = 0; i < elt->map->n_fields; i++) { > > > + atomic64_set(&dup_elt->fields[i].sum, > > > +

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-16 Thread Tom Zanussi
On Thu, 2015-07-16 at 19:49 +0200, Peter Zijlstra wrote: > On Thu, Jul 16, 2015 at 12:22:40PM -0500, Tom Zanussi wrote: > > + for (i = 0; i < elt->map->n_fields; i++) { > > + atomic64_set(&dup_elt->fields[i].sum, > > +atomic64_read(&elt->fields[i].sum)); > > +

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-16 Thread Tom Zanussi
On Thu, 2015-07-16 at 20:03 +0200, Peter Zijlstra wrote: > On Thu, Jul 16, 2015 at 12:22:40PM -0500, Tom Zanussi wrote: > > + map->map = kcalloc(map->map_size, sizeof(struct tracing_map_entry), > > + GFP_KERNEL); > > In a later email you state the max map size to be 128k, wi

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-16 Thread Peter Zijlstra
On Thu, Jul 16, 2015 at 12:22:40PM -0500, Tom Zanussi wrote: > + map->map = kcalloc(map->map_size, sizeof(struct tracing_map_entry), > +GFP_KERNEL); In a later email you state the max map size to be 128k, with a 16 byte struct, that is 2m of memory for this allocation.

Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-16 Thread Peter Zijlstra
On Thu, Jul 16, 2015 at 12:22:40PM -0500, Tom Zanussi wrote: > + for (i = 0; i < elt->map->n_fields; i++) { > + atomic64_set(&dup_elt->fields[i].sum, > + atomic64_read(&elt->fields[i].sum)); > + dup_elt->fields[i].cmp_fn = elt->fields[i].cmp_fn;

[PATCH v9 07/22] tracing: Add lock-free tracing_map

2015-07-16 Thread Tom Zanussi
Add tracing_map, a special-purpose lock-free map for tracing. tracing_map is designed to aggregate or 'sum' one or more values associated with a specific object of type tracing_map_elt, which is associated by the map to a given key. It provides various hooks allowing per-tracer customization and