* Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up [not found] ` <20150617083350.GA2433@linutronix.de> @ 2015-06-19 17:51 ` Kevin Hilman 2015-06-19 18:54 ` Thomas Gleixner 0 siblings, 1 reply; 3+ messages in thread From: Kevin Hilman @ 2015-06-19 17:51 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Davidlohr Bueso, Thomas Gleixner, Peter Zijlstra, Ingo Molnar, Steven Rostedt, Mike Galbraith, Paul E. McKenney, lkml, Tyler Baker, Olof Johansson, Tony Lindgren, linux-omap, Santosh Shilimkar, Felipe Balbi, Nishanth Menon On Wed, Jun 17, 2015 at 1:33 AM, Sebastian Andrzej Siewior <bigeasy@linutronix.de> 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 lock which is released by the owner shortly after. > This patch rearranges the unlock path by first releasing the HB lock and > then waking up the task. > > [bigeasy: redo ontop of lockless wake-queues] > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- > * Davidlohr Bueso | 2015-06-16 12:50:26 [-0700]: > >>I prefer having two separate patches, thus keeping their own changelog >>for the change justification. > > okay, here it is on top of #1. 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 (futex: Lower the lock contention on the HB lock during wake up). I confirmed that reverting that patch on top of next-20150619 gets things booting again for the affected platforms. I haven't debugged this any further, but full boot logs are available for the boot failures[2][3] and the linux-omap list and maintainer are Cc'd here to help investigate further if needed. Kevin [1] http://kernelci.org/boot/all/job/next/kernel/next-20150619/ [2] http://storage.kernelci.org/next/next-20150619/arm-multi_v7_defconfig/lab-khilman/boot-omap5-uevm.html [3] http://storage.kernelci.org/next/next-20150619/arm-omap2plus_defconfig/lab-tbaker/boot-omap3-beagle-xm.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up 2015-06-19 17:51 ` [PATCH v2] futex: lower the lock contention on the HB lock during wake up Kevin Hilman @ 2015-06-19 18:54 ` Thomas Gleixner 2015-06-19 19:32 ` Kevin Hilman 0 siblings, 1 reply; 3+ messages in thread From: Thomas Gleixner @ 2015-06-19 18:54 UTC (permalink / raw) To: Kevin Hilman Cc: Sebastian Andrzej Siewior, Davidlohr Bueso, Peter Zijlstra, Ingo Molnar, Steven Rostedt, Mike Galbraith, Paul E. McKenney, lkml, Tyler Baker, Olof Johansson, Tony Lindgren, linux-omap, Santosh Shilimkar, Felipe Balbi, Nishanth Menon 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 (futex: Lower the > lock contention on the HB lock during wake up). I confirmed that > reverting that patch on top of next-20150619 gets things booting again > for the affected platforms. > > I haven't debugged this any further, but full boot logs are available > for the boot failures[2][3] and the linux-omap list and maintainer are > Cc'd here to help investigate further if needed. Found it. Dunno, how I missed that one. Fix below. Thanks, tglx --- diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 10dbeb6fe96f..5674b073473c 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -1365,9 +1365,14 @@ rt_mutex_fastunlock(struct rt_mutex *lock, if (likely(rt_mutex_cmpxchg(lock, current, NULL))) { rt_mutex_deadlock_account_unlock(current); - } else if (slowfn(lock, &wake_q)) { + } else { + bool deboost = slowfn(lock, &wake_q); + + wake_up_q(&wake_q); + /* Undo pi boosting if necessary: */ - rt_mutex_adjust_prio(current); + if (deboost) + rt_mutex_adjust_prio(current); } } ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] futex: lower the lock contention on the HB lock during wake up 2015-06-19 18:54 ` Thomas Gleixner @ 2015-06-19 19:32 ` Kevin Hilman 0 siblings, 0 replies; 3+ messages in thread From: Kevin Hilman @ 2015-06-19 19:32 UTC (permalink / raw) To: Thomas Gleixner Cc: Sebastian Andrzej Siewior, Davidlohr Bueso, Peter Zijlstra, Ingo Molnar, Steven Rostedt, Mike Galbraith, Paul E. McKenney, lkml, Tyler Baker, Olof Johansson, Tony Lindgren, linux-omap, Santosh Shilimkar, Felipe Balbi, Nishanth Menon Thomas Gleixner <tglx@linutronix.de> 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 form of commit 881bd58d6e9e (futex: Lower the >> lock contention on the HB lock during wake up). I confirmed that >> reverting that patch on top of next-20150619 gets things booting again >> for the affected platforms. >> >> I haven't debugged this any further, but full boot logs are available >> for the boot failures[2][3] and the linux-omap list and maintainer are >> Cc'd here to help investigate further if needed. > > Found it. Dunno, how I missed that one. Fix below. > Yup, that fix on top of next-20150619 gets the two OMAP platforms booting again. Tested-by: Kevin Hilman <khilman@linaro.org> Kevin ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-06-19 19:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1432056298-18738-1-git-send-email-dave@stgolabs.net>
[not found] ` <1432056298-18738-2-git-send-email-dave@stgolabs.net>
[not found] ` <20150616192911.GA19500@linutronix.de>
[not found] ` <1434484226.1903.19.camel@stgolabs.net>
[not found] ` <20150617083350.GA2433@linutronix.de>
2015-06-19 17:51 ` [PATCH v2] futex: lower the lock contention on the HB lock during wake up Kevin Hilman
2015-06-19 18:54 ` Thomas Gleixner
2015-06-19 19:32 ` Kevin Hilman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).