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

2012-11-01 Thread Sasha Levin
On Tue, Oct 30, 2012 at 10:23 PM, Linus Torvalds wrote: > On Tue, Oct 30, 2012 at 6:36 PM, Sasha Levin wrote: >> >> I can either rebase that on top of mainline, or we can ask maintainers >> to take it to their own trees if you take only 01/16 into mainline. >> What would you prefer? > > I don't

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

2012-11-01 Thread Sasha Levin
On Tue, Oct 30, 2012 at 10:23 PM, Linus Torvalds torva...@linux-foundation.org wrote: On Tue, Oct 30, 2012 at 6:36 PM, Sasha Levin levinsasha...@gmail.com wrote: I can either rebase that on top of mainline, or we can ask maintainers to take it to their own trees if you take only 01/16 into

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

2012-10-31 Thread David Laight
> > > On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: > > >> +/* Use hash_32 when possible to allow for fast 32bit hashing in 64bit > > >> kernels. */ > > >> +#define hash_min(val, bits) > > >> \ > > >> +({

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

2012-10-31 Thread David Laight
On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: +/* Use hash_32 when possible to allow for fast 32bit hashing in 64bit kernels. */ +#define hash_min(val, bits) \ +({

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

2012-10-30 Thread Linus Torvalds
On Tue, Oct 30, 2012 at 8:24 PM, Al Viro wrote: > > Oh, well... there go my blackmail plans ;-) Seriously, though, I'm at loss > regarding several embedded architectures - arch/score, in particular, > seems to be completely orphaned. Don't worry about it. Do a best-effort, and if nobody ever

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

2012-10-30 Thread Al Viro
On Tue, Oct 30, 2012 at 07:48:19PM -0700, Linus Torvalds wrote: > On Tue, Oct 30, 2012 at 7:24 PM, Al Viro wrote: > > > > BTW, how serious have you been back at KS when you were talking about > > pull requests killing a thousand of lines of code being acceptable > > at any point in the cycle? >

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

2012-10-30 Thread Linus Torvalds
On Tue, Oct 30, 2012 at 7:24 PM, Al Viro wrote: > > BTW, how serious have you been back at KS when you were talking about > pull requests killing a thousand of lines of code being acceptable > at any point in the cycle? Well... I'm absolutely a lot more open to pull requests that kill code than

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

2012-10-30 Thread Al Viro
On Tue, Oct 30, 2012 at 06:25:46PM -0700, Linus Torvalds wrote: > But whatever. This series has gotten way too much bike-shedding > anyway. I think it should just be applied, since it does remove lines > of code overall. I'd even possibly apply it to mainline, but it seems > to be against

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

2012-10-30 Thread Linus Torvalds
On Tue, Oct 30, 2012 at 6:36 PM, Sasha Levin wrote: > > I can either rebase that on top of mainline, or we can ask maintainers > to take it to their own trees if you take only 01/16 into mainline. > What would you prefer? I don't really care deeply. The only reason to merge it now would be to

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

2012-10-30 Thread Sasha Levin
Hi Linus, > But whatever. This series has gotten way too much bike-shedding > anyway. I think it should just be applied, since it does remove lines > of code overall. I'd even possibly apply it to mainline, but it seems > to be against linux-next. Yup, I switched to using -next because I've been

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

2012-10-30 Thread Steven Rostedt
On Tue, 2012-10-30 at 18:25 -0700, Linus Torvalds wrote: > On Tue, Oct 30, 2012 at 6:16 PM, Steven Rostedt wrote: > > > > ({\ > > sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits); \ > > }) > > > > Is the

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

2012-10-30 Thread Linus Torvalds
On Tue, Oct 30, 2012 at 6:16 PM, Steven Rostedt wrote: > > ({\ > sizeof(val) <= 4 ? hash_32(val, bits) : hash_long(val, bits); \ > }) > > Is the better way to go. We are C programmers, we like to see the ?: on > a single

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

2012-10-30 Thread Steven Rostedt
On Tue, 2012-10-30 at 20:33 -0400, Sasha Levin wrote: > On Tue, Oct 30, 2012 at 5:42 PM, Tejun Heo wrote: > > Hello, > > > > Just some nitpicks. > > > > On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: > >> +/* Use hash_32 when possible to allow for fast 32bit hashing in 64bit > >>

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

2012-10-30 Thread Sasha Levin
On Tue, Oct 30, 2012 at 8:51 PM, Jim Rees wrote: > Sasha Levin wrote: > > On Tue, Oct 30, 2012 at 5:42 PM, Tejun Heo wrote: > > Hello, > > > > Just some nitpicks. > > > > On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: > >> +/* Use hash_32 when possible to allow for

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

2012-10-30 Thread Jim Rees
Sasha Levin wrote: On Tue, Oct 30, 2012 at 5:42 PM, Tejun Heo wrote: > Hello, > > Just some nitpicks. > > On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: >> +/* Use hash_32 when possible to allow for fast 32bit hashing in 64bit kernels. */ >> +#define hash_min(val,

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

2012-10-30 Thread Sasha Levin
On Tue, Oct 30, 2012 at 5:42 PM, Tejun Heo wrote: > Hello, > > Just some nitpicks. > > On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: >> +/* Use hash_32 when possible to allow for fast 32bit hashing in 64bit >> kernels. */ >> +#define hash_min(val, bits)

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

2012-10-30 Thread Tejun Heo
Hello, Just some nitpicks. On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: > +/* Use hash_32 when possible to allow for fast 32bit hashing in 64bit > kernels. */ > +#define hash_min(val, bits) > \ > +({

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

2012-10-30 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 Reviewed-by: Mathieu Desnoyers > --- > > Changes from v8: > > -

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

2012-10-30 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 Reviewed-by: Mathieu Desnoyers

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

2012-10-30 Thread Tejun Heo
Hello, Just some nitpicks. On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: +/* Use hash_32 when possible to allow for fast 32bit hashing in 64bit kernels. */ +#define hash_min(val, bits) \ +({

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

2012-10-30 Thread Sasha Levin
On Tue, Oct 30, 2012 at 5:42 PM, Tejun Heo t...@kernel.org wrote: Hello, Just some nitpicks. On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: +/* Use hash_32 when possible to allow for fast 32bit hashing in 64bit kernels. */ +#define hash_min(val, bits)

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

2012-10-30 Thread Jim Rees
Sasha Levin wrote: On Tue, Oct 30, 2012 at 5:42 PM, Tejun Heo t...@kernel.org wrote: Hello, Just some nitpicks. On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: +/* Use hash_32 when possible to allow for fast 32bit hashing in 64bit kernels. */ +#define

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

2012-10-30 Thread Sasha Levin
On Tue, Oct 30, 2012 at 8:51 PM, Jim Rees r...@umich.edu wrote: Sasha Levin wrote: On Tue, Oct 30, 2012 at 5:42 PM, Tejun Heo t...@kernel.org wrote: Hello, Just some nitpicks. On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: +/* Use hash_32 when possible to

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

2012-10-30 Thread Steven Rostedt
On Tue, 2012-10-30 at 20:33 -0400, Sasha Levin wrote: On Tue, Oct 30, 2012 at 5:42 PM, Tejun Heo t...@kernel.org wrote: Hello, Just some nitpicks. On Tue, Oct 30, 2012 at 02:45:57PM -0400, Sasha Levin wrote: +/* Use hash_32 when possible to allow for fast 32bit hashing in 64bit

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

2012-10-30 Thread Linus Torvalds
On Tue, Oct 30, 2012 at 6:16 PM, Steven Rostedt rost...@goodmis.org wrote: ({\ sizeof(val) = 4 ? hash_32(val, bits) : hash_long(val, bits); \ }) Is the better way to go. We are C programmers, we like to see the ?: on

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

2012-10-30 Thread Steven Rostedt
On Tue, 2012-10-30 at 18:25 -0700, Linus Torvalds wrote: On Tue, Oct 30, 2012 at 6:16 PM, Steven Rostedt rost...@goodmis.org wrote: ({\ sizeof(val) = 4 ? hash_32(val, bits) : hash_long(val, bits); \ }) Is the

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

2012-10-30 Thread Sasha Levin
Hi Linus, But whatever. This series has gotten way too much bike-shedding anyway. I think it should just be applied, since it does remove lines of code overall. I'd even possibly apply it to mainline, but it seems to be against linux-next. Yup, I switched to using -next because I've been

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

2012-10-30 Thread Linus Torvalds
On Tue, Oct 30, 2012 at 6:36 PM, Sasha Levin levinsasha...@gmail.com wrote: I can either rebase that on top of mainline, or we can ask maintainers to take it to their own trees if you take only 01/16 into mainline. What would you prefer? I don't really care deeply. The only reason to merge it

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

2012-10-30 Thread Al Viro
On Tue, Oct 30, 2012 at 06:25:46PM -0700, Linus Torvalds wrote: But whatever. This series has gotten way too much bike-shedding anyway. I think it should just be applied, since it does remove lines of code overall. I'd even possibly apply it to mainline, but it seems to be against linux-next.

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

2012-10-30 Thread Linus Torvalds
On Tue, Oct 30, 2012 at 7:24 PM, Al Viro v...@zeniv.linux.org.uk wrote: BTW, how serious have you been back at KS when you were talking about pull requests killing a thousand of lines of code being acceptable at any point in the cycle? Well... I'm absolutely a lot more open to pull requests

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

2012-10-30 Thread Al Viro
On Tue, Oct 30, 2012 at 07:48:19PM -0700, Linus Torvalds wrote: On Tue, Oct 30, 2012 at 7:24 PM, Al Viro v...@zeniv.linux.org.uk wrote: BTW, how serious have you been back at KS when you were talking about pull requests killing a thousand of lines of code being acceptable at any point in

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

2012-10-30 Thread Linus Torvalds
On Tue, Oct 30, 2012 at 8:24 PM, Al Viro v...@zeniv.linux.org.uk wrote: Oh, well... there go my blackmail plans ;-) Seriously, though, I'm at loss regarding several embedded architectures - arch/score, in particular, seems to be completely orphaned. Don't worry about it. Do a best-effort,