Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Andrew Morton
On Mon, 29 Oct 2012 07:49:42 -0700 Linus Torvalds wrote: > Because there's no reason to believe that '9' is in any way a worse > random number than something page-shift-related, is there? 9 is much better than PAGE_SHIFT. PAGE_SIZE can vary by a factor of 16, depending on config. Everyone

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* J. Bruce Fields (bfie...@fieldses.org) wrote: > On Mon, Oct 29, 2012 at 11:13:43AM -0400, Mathieu Desnoyers wrote: > > * Linus Torvalds (torva...@linux-foundation.org) wrote: > > > On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers > > > wrote: > > > > > > > > So defining e.g.: > > > > > > > >

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread J. Bruce Fields
On Mon, Oct 29, 2012 at 11:13:43AM -0400, Mathieu Desnoyers wrote: > * Linus Torvalds (torva...@linux-foundation.org) wrote: > > On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers > > wrote: > > > > > > So defining e.g.: > > > > > > #include > > > > > > #define DFR_HASH_BITS (PAGE_SHIFT -

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Linus Torvalds (torva...@linux-foundation.org) wrote: > On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers > wrote: > > > > So defining e.g.: > > > > #include > > > > #define DFR_HASH_BITS (PAGE_SHIFT - ilog2(BITS_PER_LONG)) > > > > would keep the intended behavior in all cases: use one page

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Linus Torvalds
On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers wrote: > > So defining e.g.: > > #include > > #define DFR_HASH_BITS (PAGE_SHIFT - ilog2(BITS_PER_LONG)) > > would keep the intended behavior in all cases: use one page for the hash > array. Well, since that wasn't true before either because of

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: > Switch cache to use the new hashtable implementation. This reduces the amount > of > generic unrelated code in the cache implementation. > > Signed-off-by: Sasha Levin > --- > net/sunrpc/cache.c | 20 +--- > 1 file changed, 9

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Sasha Levin (levinsasha...@gmail.com) wrote: Switch cache to use the new hashtable implementation. This reduces the amount of generic unrelated code in the cache implementation. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- net/sunrpc/cache.c | 20 +--- 1 file

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Linus Torvalds
On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: So defining e.g.: #include linux/log2.h #define DFR_HASH_BITS (PAGE_SHIFT - ilog2(BITS_PER_LONG)) would keep the intended behavior in all cases: use one page for the hash array. Well, since that

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* Linus Torvalds (torva...@linux-foundation.org) wrote: On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: So defining e.g.: #include linux/log2.h #define DFR_HASH_BITS (PAGE_SHIFT - ilog2(BITS_PER_LONG)) would keep the intended behavior in

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread J. Bruce Fields
On Mon, Oct 29, 2012 at 11:13:43AM -0400, Mathieu Desnoyers wrote: * Linus Torvalds (torva...@linux-foundation.org) wrote: On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: So defining e.g.: #include linux/log2.h #define DFR_HASH_BITS

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Mathieu Desnoyers
* J. Bruce Fields (bfie...@fieldses.org) wrote: On Mon, Oct 29, 2012 at 11:13:43AM -0400, Mathieu Desnoyers wrote: * Linus Torvalds (torva...@linux-foundation.org) wrote: On Mon, Oct 29, 2012 at 5:42 AM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: So defining e.g.:

Re: [PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-29 Thread Andrew Morton
On Mon, 29 Oct 2012 07:49:42 -0700 Linus Torvalds torva...@linux-foundation.org wrote: Because there's no reason to believe that '9' is in any way a worse random number than something page-shift-related, is there? 9 is much better than PAGE_SHIFT. PAGE_SIZE can vary by a factor of 16,

[PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-28 Thread Sasha Levin
Switch cache to use the new hashtable implementation. This reduces the amount of generic unrelated code in the cache implementation. Signed-off-by: Sasha Levin --- net/sunrpc/cache.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/net/sunrpc/cache.c

[PATCH v7 09/16] SUNRPC/cache: use new hashtable implementation

2012-10-28 Thread Sasha Levin
Switch cache to use the new hashtable implementation. This reduces the amount of generic unrelated code in the cache implementation. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- net/sunrpc/cache.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git