[PATCH 02/16] user_ns: use new hashtable implementation

2012-08-18 Thread Sasha Levin
Switch user_ns to use the new hashtable implementation. This reduces the amount of generic unrelated code in user_ns. Signed-off-by: Sasha Levin --- kernel/user.c | 33 + 1 files changed, 13 insertions(+), 20 deletions(-) diff --git a/kernel/user.c

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-18 Thread Eric W. Biederman
Sasha Levin writes: > On 08/15/2012 01:52 AM, Eric W. Biederman wrote: >> Sasha Levin writes: >>> > Switch user_ns to use the new hashtable implementation. This reduces the >>> > amount of >>> > generic unrelated code in user_ns. >> Two concerns here. >> 1) When adding a new entry you

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-18 Thread Sasha Levin
On 08/15/2012 01:52 AM, Eric W. Biederman wrote: > Sasha Levin writes: >> > Switch user_ns to use the new hashtable implementation. This reduces the >> > amount of >> > generic unrelated code in user_ns. > Two concerns here. > 1) When adding a new entry you recompute the hash where previously

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-18 Thread Sasha Levin
On 08/15/2012 01:52 AM, Eric W. Biederman wrote: Sasha Levin levinsasha...@gmail.com writes: Switch user_ns to use the new hashtable implementation. This reduces the amount of generic unrelated code in user_ns. Two concerns here. 1) When adding a new entry you recompute the hash where

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-18 Thread Eric W. Biederman
Sasha Levin levinsasha...@gmail.com writes: On 08/15/2012 01:52 AM, Eric W. Biederman wrote: Sasha Levin levinsasha...@gmail.com writes: Switch user_ns to use the new hashtable implementation. This reduces the amount of generic unrelated code in user_ns. Two concerns here. 1) When

[PATCH 02/16] user_ns: use new hashtable implementation

2012-08-18 Thread Sasha Levin
Switch user_ns to use the new hashtable implementation. This reduces the amount of generic unrelated code in user_ns. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- kernel/user.c | 33 + 1 files changed, 13 insertions(+), 20 deletions(-) diff --git

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-16 Thread Mathieu Desnoyers
* David Laight (david.lai...@aculab.com) wrote: > > Yes hash_32 seems reasonable for the uid hash. With those long hash > > chains I wouldn't like to be on a machine with 10,000 processes with > > each with a different uid, and a processes calling setuid in the fast > > path. > > > > The uid

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-16 Thread Mathieu Desnoyers
* David Laight (david.lai...@aculab.com) wrote: Yes hash_32 seems reasonable for the uid hash. With those long hash chains I wouldn't like to be on a machine with 10,000 processes with each with a different uid, and a processes calling setuid in the fast path. The uid hash that we

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-15 Thread Sasha Levin
On 08/15/2012 05:31 AM, Mathieu Desnoyers wrote: > * Eric W. Biederman (ebied...@xmission.com) wrote: >> Sasha Levin writes: >> >>> On 08/15/2012 03:08 AM, Eric W. Biederman wrote: > I can offer the following: I'll write a small module that will hash > 1...1 >> into a hashtable

RE: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-15 Thread David Laight
> Yes hash_32 seems reasonable for the uid hash. With those long hash > chains I wouldn't like to be on a machine with 10,000 processes with > each with a different uid, and a processes calling setuid in the fast > path. > > The uid hash that we are playing with is one that I sort of wish that

RE: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-15 Thread David Laight
Yes hash_32 seems reasonable for the uid hash. With those long hash chains I wouldn't like to be on a machine with 10,000 processes with each with a different uid, and a processes calling setuid in the fast path. The uid hash that we are playing with is one that I sort of wish that the

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-15 Thread Sasha Levin
On 08/15/2012 05:31 AM, Mathieu Desnoyers wrote: * Eric W. Biederman (ebied...@xmission.com) wrote: Sasha Levin levinsasha...@gmail.com writes: On 08/15/2012 03:08 AM, Eric W. Biederman wrote: I can offer the following: I'll write a small module that will hash 1...1 into a hashtable

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Mathieu Desnoyers
* Eric W. Biederman (ebied...@xmission.com) wrote: > Sasha Levin writes: > > > On 08/15/2012 03:08 AM, Eric W. Biederman wrote: > >>> I can offer the following: I'll write a small module that will hash > >>> 1...1 > >>> > into a hashtable which uses 7 bits (just like user_ns) and post the

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Eric W. Biederman
Sasha Levin writes: > On 08/15/2012 03:08 AM, Eric W. Biederman wrote: >>> I can offer the following: I'll write a small module that will hash >>> 1...1 >>> > into a hashtable which uses 7 bits (just like user_ns) and post the >>> > distribution >>> > we'll get. >> That won't hurt. I

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Sasha Levin
On 08/15/2012 03:08 AM, Eric W. Biederman wrote: >> I can offer the following: I'll write a small module that will hash 1...1 >> > into a hashtable which uses 7 bits (just like user_ns) and post the >> > distribution >> > we'll get. > That won't hurt. I think 1-100 then 1000-1100 may

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Eric W. Biederman
Sasha Levin writes: > On 08/15/2012 01:52 AM, Eric W. Biederman wrote: >> Sasha Levin writes: >> >>> Switch user_ns to use the new hashtable implementation. This reduces the >>> amount of >>> generic unrelated code in user_ns. >> >> Two concerns here. >> 1) When adding a new entry you

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Sasha Levin
On 08/15/2012 01:52 AM, Eric W. Biederman wrote: > Sasha Levin writes: > >> Switch user_ns to use the new hashtable implementation. This reduces the >> amount of >> generic unrelated code in user_ns. > > Two concerns here. > 1) When adding a new entry you recompute the hash where previously

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Eric W. Biederman
Sasha Levin writes: > Switch user_ns to use the new hashtable implementation. This reduces the > amount of > generic unrelated code in user_ns. Two concerns here. 1) When adding a new entry you recompute the hash where previously that was not done. I believe that will slow down adding of

[PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Sasha Levin
Switch user_ns to use the new hashtable implementation. This reduces the amount of generic unrelated code in user_ns. Signed-off-by: Sasha Levin --- kernel/user.c | 33 + 1 files changed, 13 insertions(+), 20 deletions(-) diff --git a/kernel/user.c

[PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Sasha Levin
Switch user_ns to use the new hashtable implementation. This reduces the amount of generic unrelated code in user_ns. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- kernel/user.c | 33 + 1 files changed, 13 insertions(+), 20 deletions(-) diff --git

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Eric W. Biederman
Sasha Levin levinsasha...@gmail.com writes: Switch user_ns to use the new hashtable implementation. This reduces the amount of generic unrelated code in user_ns. Two concerns here. 1) When adding a new entry you recompute the hash where previously that was not done. I believe that will

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Sasha Levin
On 08/15/2012 01:52 AM, Eric W. Biederman wrote: Sasha Levin levinsasha...@gmail.com writes: Switch user_ns to use the new hashtable implementation. This reduces the amount of generic unrelated code in user_ns. Two concerns here. 1) When adding a new entry you recompute the hash where

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Eric W. Biederman
Sasha Levin levinsasha...@gmail.com writes: On 08/15/2012 01:52 AM, Eric W. Biederman wrote: Sasha Levin levinsasha...@gmail.com writes: Switch user_ns to use the new hashtable implementation. This reduces the amount of generic unrelated code in user_ns. Two concerns here. 1) When

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Sasha Levin
On 08/15/2012 03:08 AM, Eric W. Biederman wrote: I can offer the following: I'll write a small module that will hash 1...1 into a hashtable which uses 7 bits (just like user_ns) and post the distribution we'll get. That won't hurt. I think 1-100 then 1000-1100 may actually be more

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Eric W. Biederman
Sasha Levin levinsasha...@gmail.com writes: On 08/15/2012 03:08 AM, Eric W. Biederman wrote: I can offer the following: I'll write a small module that will hash 1...1 into a hashtable which uses 7 bits (just like user_ns) and post the distribution we'll get. That won't hurt. I

Re: [PATCH 02/16] user_ns: use new hashtable implementation

2012-08-14 Thread Mathieu Desnoyers
* Eric W. Biederman (ebied...@xmission.com) wrote: Sasha Levin levinsasha...@gmail.com writes: On 08/15/2012 03:08 AM, Eric W. Biederman wrote: I can offer the following: I'll write a small module that will hash 1...1 into a hashtable which uses 7 bits (just like user_ns) and post