Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-30 Thread Peter Zijlstra
On Fri, May 27, 2016 at 07:27:57PM +0200, Sebastian Andrzej Siewior wrote: > On 2016-05-19 14:25:58 [+0200], Peter Zijlstra wrote: > > On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > > > +static int futex_preallocate_hash(unsigned int slots) > > > +{ > > > +#ifdef

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-30 Thread Peter Zijlstra
On Fri, May 27, 2016 at 07:27:57PM +0200, Sebastian Andrzej Siewior wrote: > On 2016-05-19 14:25:58 [+0200], Peter Zijlstra wrote: > > On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > > > +static int futex_preallocate_hash(unsigned int slots) > > > +{ > > > +#ifdef

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-27 Thread Sebastian Andrzej Siewior
On 2016-05-19 14:25:58 [+0200], Peter Zijlstra wrote: > On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > > +static int futex_preallocate_hash(unsigned int slots) > > +{ > > +#ifdef CONFIG_FUTEX_PRIVATE_HASH > > + struct mm_struct *mm = current->mm; > > + struct

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-27 Thread Sebastian Andrzej Siewior
On 2016-05-19 14:25:58 [+0200], Peter Zijlstra wrote: > On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > > +static int futex_preallocate_hash(unsigned int slots) > > +{ > > +#ifdef CONFIG_FUTEX_PRIVATE_HASH > > + struct mm_struct *mm = current->mm; > > + struct

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Peter Zijlstra
On Thu, May 19, 2016 at 12:38:19PM -0700, Darren Hart wrote: > On Thu, May 19, 2016 at 02:24:57PM +0200, Peter Zijlstra wrote: > > OK, so no on-line rehashing possible? > > It doesn't do it currently... did you see something that makes it impossible > to > add? No, just tons of tricky.

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Peter Zijlstra
On Thu, May 19, 2016 at 12:38:19PM -0700, Darren Hart wrote: > On Thu, May 19, 2016 at 02:24:57PM +0200, Peter Zijlstra wrote: > > OK, so no on-line rehashing possible? > > It doesn't do it currently... did you see something that makes it impossible > to > add? No, just tons of tricky.

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Darren Hart
On Thu, May 19, 2016 at 02:24:57PM +0200, Peter Zijlstra wrote: > On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > > From: Sebastian Siewior > > > > The per process hash is allocated on the fly at the first futex operation > > of a > > process. The size

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Darren Hart
On Thu, May 19, 2016 at 02:24:57PM +0200, Peter Zijlstra wrote: > On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > > From: Sebastian Siewior > > > > The per process hash is allocated on the fly at the first futex operation > > of a > > process. The size of the hash is

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Darren Hart
On Thu, May 19, 2016 at 02:28:49PM +0200, Peter Zijlstra wrote: > On Sat, May 07, 2016 at 10:47:38AM +0200, Thomas Gleixner wrote: > > On Fri, 6 May 2016, Darren Hart wrote: > > > > So this seems like it could be tricky for the user as system libraries, > > > like > > > glibc, make use of

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Darren Hart
On Thu, May 19, 2016 at 02:28:49PM +0200, Peter Zijlstra wrote: > On Sat, May 07, 2016 at 10:47:38AM +0200, Thomas Gleixner wrote: > > On Fri, 6 May 2016, Darren Hart wrote: > > > > So this seems like it could be tricky for the user as system libraries, > > > like > > > glibc, make use of

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Peter Zijlstra
On Sat, May 07, 2016 at 10:47:38AM +0200, Thomas Gleixner wrote: > On Fri, 6 May 2016, Darren Hart wrote: > > So this seems like it could be tricky for the user as system libraries, like > > glibc, make use of futexes. Can we guarantee that "sys_futex" is not called > > by > > the time main() is

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Peter Zijlstra
On Sat, May 07, 2016 at 10:47:38AM +0200, Thomas Gleixner wrote: > On Fri, 6 May 2016, Darren Hart wrote: > > So this seems like it could be tricky for the user as system libraries, like > > glibc, make use of futexes. Can we guarantee that "sys_futex" is not called > > by > > the time main() is

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Peter Zijlstra
On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > +static int futex_preallocate_hash(unsigned int slots) > +{ > +#ifdef CONFIG_FUTEX_PRIVATE_HASH > + struct mm_struct *mm = current->mm; > + struct futex_hash_bucket *hb; > + unsigned int bits; > + > + /* Try to

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Peter Zijlstra
On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > +static int futex_preallocate_hash(unsigned int slots) > +{ > +#ifdef CONFIG_FUTEX_PRIVATE_HASH > + struct mm_struct *mm = current->mm; > + struct futex_hash_bucket *hb; > + unsigned int bits; > + > + /* Try to

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Peter Zijlstra
On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > From: Sebastian Siewior > > The per process hash is allocated on the fly at the first futex operation of a > process. The size of the hash is determined by a system wide default setting > controlled by the

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-19 Thread Peter Zijlstra
On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > From: Sebastian Siewior > > The per process hash is allocated on the fly at the first futex operation of a > process. The size of the hash is determined by a system wide default setting > controlled by the sys admin, This is

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-07 Thread Thomas Gleixner
On Sat, 7 May 2016, Thomas Gleixner wrote: > On Fri, 6 May 2016, Darren Hart wrote: > > > Note, that this call must be issued before the first futex operation in > > > the > > > process because that would automatically allocate the default sized hash. > > > > So this seems like it could be

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-07 Thread Thomas Gleixner
On Sat, 7 May 2016, Thomas Gleixner wrote: > On Fri, 6 May 2016, Darren Hart wrote: > > > Note, that this call must be issued before the first futex operation in > > > the > > > process because that would automatically allocate the default sized hash. > > > > So this seems like it could be

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-07 Thread Thomas Gleixner
On Fri, 6 May 2016, Darren Hart wrote: > On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > > From: Sebastian Siewior > > > > The per process hash is allocated on the fly at the first futex operation > > of a > > process. The size of the hash is determined

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-07 Thread Thomas Gleixner
On Fri, 6 May 2016, Darren Hart wrote: > On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > > From: Sebastian Siewior > > > > The per process hash is allocated on the fly at the first futex operation > > of a > > process. The size of the hash is determined by a system wide

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-06 Thread Darren Hart
On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > From: Sebastian Siewior > > The per process hash is allocated on the fly at the first futex operation of a > process. The size of the hash is determined by a system wide default setting > controlled by the

Re: [patch V2 3/7] futex: Add op for hash preallocation

2016-05-06 Thread Darren Hart
On Thu, May 05, 2016 at 08:44:05PM -, Thomas Gleixner wrote: > From: Sebastian Siewior > > The per process hash is allocated on the fly at the first futex operation of a > process. The size of the hash is determined by a system wide default setting > controlled by the sys admin, This is

[patch V2 3/7] futex: Add op for hash preallocation

2016-05-05 Thread Thomas Gleixner
From: Sebastian Siewior The per process hash is allocated on the fly at the first futex operation of a process. The size of the hash is determined by a system wide default setting controlled by the sys admin, This is suboptimal for RT applications and applications with

[patch V2 3/7] futex: Add op for hash preallocation

2016-05-05 Thread Thomas Gleixner
From: Sebastian Siewior The per process hash is allocated on the fly at the first futex operation of a process. The size of the hash is determined by a system wide default setting controlled by the sys admin, This is suboptimal for RT applications and applications with pathological futex abuse,

[patch V2 3/7] futex: Add op for hash preallocation

2016-05-05 Thread Thomas Gleixner
From: Sebastian Siewior The per process hash is allocated on the fly at the first futex operation of a process. The size of the hash is determined by a system wide default setting controlled by the sys admin, This is suboptimal for RT applications and applications with

[patch V2 3/7] futex: Add op for hash preallocation

2016-05-05 Thread Thomas Gleixner
From: Sebastian Siewior The per process hash is allocated on the fly at the first futex operation of a process. The size of the hash is determined by a system wide default setting controlled by the sys admin, This is suboptimal for RT applications and applications with pathological futex abuse,