RE: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-09-17 Thread Thomas Gleixner
On Wed, 16 Sep 2015, Zhu Jefferry wrote: > Besides the application did not check the return value, the mutex_unlock in > Libc did not check the return value from kernel neither. That's even worse. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

RE: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-09-16 Thread Zhu Jefferry
> On Wed, 16 Sep 2015, Zhu Jefferry wrote: > > > > The primary debugging shows the content of __lock is wrong in first. > > > > After a call of Mutex_unlock, the value of __lock should not be > > > > this thread self. But we observed The value of __lock is still > > > > self after unlock. So, other

RE: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-09-16 Thread Thomas Gleixner
On Wed, 16 Sep 2015, Zhu Jefferry wrote: > > > The primary debugging shows the content of __lock is wrong in first. > > > After a call of Mutex_unlock, the value of __lock should not be this > > > thread self. But we observed The value of __lock is still self after > > > unlock. So, other threads w

RE: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-09-16 Thread Zhu Jefferry
> On Wed, 16 Sep 2015, Zhu Jefferry wrote: > > The application is a multi-thread program, to use the pairs of > > mutex_lock and mutex_unlock to protect the shared data structure. The > > type of this mutex is PTHREAD_MUTEX_PI_RECURSIVE_NP. After running > > long time, to say several days, the mute

RE: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-09-16 Thread Thomas Gleixner
On Wed, 16 Sep 2015, Zhu Jefferry wrote: > The application is a multi-thread program, to use the pairs of mutex_lock and > mutex_unlock to protect the shared data structure. The type of this mutex > is PTHREAD_MUTEX_PI_RECURSIVE_NP. After running long time, to say several > days, > the mutex_lock

RE: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-09-16 Thread Zhu Jefferry
> > I assume your pseudo code set_waiter_bit is mapped to the real code > > "futex_lock_pi_atomic", It's possible for futex_lock_pi_atomic to > > successfully set FUTEX_WAITERS bit, but return with Page fault, for > > example, like fail in lookup_pi_state(). > > No. It's not. lookup_pi_state() can

RE: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-09-16 Thread Thomas Gleixner
On Wed, 16 Sep 2015, Zhu Jefferry wrote: > Thanks for your detail guideline and explanations. Please see my questions > in-line. Please trim the reply to the relevant sections. It's annoying if I have to search your replies inside of useless quoted text. > > -Original Message- > > From

RE: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-09-15 Thread Zhu Jefferry
.@linutronix.de > Subject: RE: [PATCH v2] futex: lower the lock contention on the HB lock > during wake up > > On Tue, 15 Sep 2015, Zhu Jefferry wrote: > > Please configure your e-mail client proper and follow the basic rules: > > - Choose a meaningful subject for your qu

RE: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-09-15 Thread Thomas Gleixner
ht of the window containing it, not all do. For the sentence above I need a 190 character wide display - Do not use colors or other gimmicks. They just make the mail unreadable in simple text based readers. > Just in the list, I see the patch "[PATCH v2] futex: lower the lock >

RE: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-09-14 Thread Zhu Jefferry
Hi Just in the list, I see the patch "[PATCH v2] futex: lower the lock contention on the HB lock during wake up" at http://www.gossamer-threads.com/lists/linux/kernel/2199938?search_string=futex;#2199938. But I see another patch with same name, different co

Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-06-20 Thread Mike Galbraith
On Wed, 2015-06-17 at 16:28 +0200, Sebastian Andrzej Siewior wrote: > On 06/17/2015 04:17 PM, Mike Galbraith wrote: > > On Wed, 2015-06-17 at 10:33 +0200, Sebastian Andrzej Siewior wrote: > >> wake_futex_pi() wakes the task before releasing the hash bucket lock > >> (HB). The first thing the woken

Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-06-19 Thread Kevin Hilman
Thomas Gleixner writes: > On Fri, 19 Jun 2015, Kevin Hilman wrote: >> On Wed, Jun 17, 2015 at 1:33 AM, Sebastian Andrzej Siewior >> A handful of boot test failures on ARM/OMAP were found by kernelci.org >> in next-20150619[1] and were bisected down to this patch, which hit >> next-20150619 in the

Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-06-19 Thread Thomas Gleixner
On Fri, 19 Jun 2015, Kevin Hilman wrote: > On Wed, Jun 17, 2015 at 1:33 AM, Sebastian Andrzej Siewior > A handful of boot test failures on ARM/OMAP were found by kernelci.org > in next-20150619[1] and were bisected down to this patch, which hit > next-20150619 in the form of commit 881bd58d6e9e (fu

Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-06-19 Thread Kevin Hilman
On Wed, Jun 17, 2015 at 1:33 AM, Sebastian Andrzej Siewior wrote: > wake_futex_pi() wakes the task before releasing the hash bucket lock > (HB). The first thing the woken up task usually does is to acquire the > lock which requires the HB lock. On SMP Systems this leads to blocking > on the HB loc

Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-06-17 Thread Mike Galbraith
On Wed, 2015-06-17 at 16:28 +0200, Sebastian Andrzej Siewior wrote: > On 06/17/2015 04:17 PM, Mike Galbraith wrote: > > On Wed, 2015-06-17 at 10:33 +0200, Sebastian Andrzej Siewior wrote: > >> wake_futex_pi() wakes the task before releasing the hash bucket lock > >> (HB). The first thing the woken

Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-06-17 Thread Sebastian Andrzej Siewior
On 06/17/2015 04:17 PM, Mike Galbraith wrote: > On Wed, 2015-06-17 at 10:33 +0200, Sebastian Andrzej Siewior wrote: >> wake_futex_pi() wakes the task before releasing the hash bucket lock >> (HB). The first thing the woken up task usually does is to acquire the >> lock which requires the HB lock. O

Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-06-17 Thread Mike Galbraith
On Wed, 2015-06-17 at 10:33 +0200, Sebastian Andrzej Siewior wrote: > wake_futex_pi() wakes the task before releasing the hash bucket lock > (HB). The first thing the woken up task usually does is to acquire the > lock which requires the HB lock. On SMP Systems this leads to blocking > on the HB lo

[PATCH v2] futex: lower the lock contention on the HB lock during wake up

2015-06-17 Thread Sebastian Andrzej Siewior
wake_futex_pi() wakes the task before releasing the hash bucket lock (HB). The first thing the woken up task usually does is to acquire the lock which requires the HB lock. On SMP Systems this leads to blocking on the HB lock which is released by the owner shortly after. This patch rearranges the u