[ovs-dev] [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 b/kernel/us

Re: [ovs-dev] [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 has

Re: [ovs-dev] [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 wh

Re: [ovs-dev] [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: [ovs-dev] [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: [ovs-dev] [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 think

Re: [ovs-dev] [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

Re: [ovs-dev] [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 recompu

Re: [ovs-dev] [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 tha

Re: [ovs-dev] [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 ne

[ovs-dev] [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 b/kernel/us