Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > On Mon, Oct 29, 2012 at 12:14 PM, Mathieu Desnoyers > wrote: > > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers > >> wrote: > >> > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> >> + >

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 12:14 PM, Mathieu Desnoyers wrote: > * Sasha Levin (levinsasha...@gmail.com) wrote: >> On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers >> wrote: >> > * Sasha Levin (levinsasha...@gmail.com) wrote: >> >> + >> >> + for (i = 0; i < sz; i++) >> >> +

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Tejun Heo (t...@kernel.org) wrote: > Hello, > > On Mon, Oct 29, 2012 at 12:14:12PM -0400, Mathieu Desnoyers wrote: > > Most of the calls to this initialization function apply it on zeroed > > memory (static/kzalloc'd...), which makes it useless. I'd actually be in > > favor of removing those

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Tejun Heo
Hello, On Mon, Oct 29, 2012 at 12:14:12PM -0400, Mathieu Desnoyers wrote: > Most of the calls to this initialization function apply it on zeroed > memory (static/kzalloc'd...), which makes it useless. I'd actually be in > favor of removing those redundant calls (as I pointed out in another >

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers > wrote: > > * Sasha Levin (levinsasha...@gmail.com) wrote: > >> + > >> + for (i = 0; i < sz; i++) > >> + INIT_HLIST_HEAD([sz]); > > > > ouch. How did this work ? Has it been tested

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers wrote: > * Sasha Levin (levinsasha...@gmail.com) wrote: >> + >> + for (i = 0; i < sz; i++) >> + INIT_HLIST_HEAD([sz]); > > ouch. How did this work ? Has it been tested at all ? > > sz -> i Funny enough, it works perfectly.

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > This hashtable implementation is using hlist buckets to provide a simple > hashtable to prevent it from getting reimplemented all over the kernel. > > Signed-off-by: Sasha Levin > --- > > Sorry for the long delay, I was busy with a bunch of

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: This hashtable implementation is using hlist buckets to provide a simple hashtable to prevent it from getting reimplemented all over the kernel. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- Sorry for the long delay, I was busy with

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Sasha Levin (levinsasha...@gmail.com) wrote: + + for (i = 0; i sz; i++) + INIT_HLIST_HEAD(ht[sz]); ouch. How did this work ? Has it been tested at all ? sz - i Funny enough, it

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Sasha Levin (levinsasha...@gmail.com) wrote: + + for (i = 0; i sz; i++) + INIT_HLIST_HEAD(ht[sz]); ouch. How did this work ? Has

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Tejun Heo
Hello, On Mon, Oct 29, 2012 at 12:14:12PM -0400, Mathieu Desnoyers wrote: Most of the calls to this initialization function apply it on zeroed memory (static/kzalloc'd...), which makes it useless. I'd actually be in favor of removing those redundant calls (as I pointed out in another email),

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Tejun Heo (t...@kernel.org) wrote: Hello, On Mon, Oct 29, 2012 at 12:14:12PM -0400, Mathieu Desnoyers wrote: Most of the calls to this initialization function apply it on zeroed memory (static/kzalloc'd...), which makes it useless. I'd actually be in favor of removing those redundant

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Sasha Levin
On Mon, Oct 29, 2012 at 12:14 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Sasha Levin (levinsasha...@gmail.com) wrote: On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Sasha Levin (levinsasha...@gmail.com) wrote: + + for (i =

Re: [PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: On Mon, Oct 29, 2012 at 12:14 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Sasha Levin (levinsasha...@gmail.com) wrote: On Mon, Oct 29, 2012 at 7:29 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: * Sasha Levin

[PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-28 Thread Sasha Levin
This hashtable implementation is using hlist buckets to provide a simple hashtable to prevent it from getting reimplemented all over the kernel. Signed-off-by: Sasha Levin --- Sorry for the long delay, I was busy with a bunch of personal things. Changes since v6: - Use macros that point to

[PATCH v7 01/16] hashtable: introduce a small and naive hashtable

2012-10-28 Thread Sasha Levin
This hashtable implementation is using hlist buckets to provide a simple hashtable to prevent it from getting reimplemented all over the kernel. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- Sorry for the long delay, I was busy with a bunch of personal things. Changes since v6: - Use