From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752325AbcI1JYi (ORCPT ); Wed, 28 Sep 2016 05:24:38 -0400 Received: from merlin.infradead.org ([205.233.59.134]:43020 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750868AbcI1JY1 (ORCPT ); Wed, 28 Sep 2016 05:24:27 -0400 Date: Wed, 28 Sep 2016 11:24:13 +0200 From: Peter Zijlstra To: Sebastian Andrzej Siewior Cc: mingo@kernel.org, tglx@linutronix.de, juri.lelli@arm.com, rostedt@goodmis.org, xlpang@redhat.com, linux-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, jdesfossez@efficios.com, bristot@redhat.com, Ingo Molnar Subject: Re: [PATCH -v2 1/9] rtmutex: Deboost before waking up the top waiter Message-ID: <20160928092413.GN5012@twins.programming.kicks-ass.net> References: <20160926123213.851818224@infradead.org> <20160926124127.863639194@infradead.org> <20160928090740.npogdsea32etq57t@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160928090740.npogdsea32etq57t@linutronix.de> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 28, 2016 at 11:07:40AM +0200, Sebastian Andrzej Siewior wrote: > On 2016-09-26 14:32:14 [+0200], Peter Zijlstra wrote: > > --- a/kernel/futex.c > > +++ b/kernel/futex.c > > @@ -1374,9 +1374,8 @@ static int wake_futex_pi(u32 __user *uad > > * scheduled away before the wake up can take place. > > */ > > spin_unlock(&hb->lock); > > - wake_up_q(&wake_q); > > - if (deboost) > > - rt_mutex_adjust_prio(current); > > + > > + rt_mutex_postunlock(&wake_q, deboost); > > This breaks -RT. Before that spin_unlock() you do a preempt_disable() > which means you had one spinlock with enabled preemption and now you get > one unlock with disabled preemption. And this breaks migrate_disable() / > enable (because we take the fast path in the in_atomic() case). Oh crud, the hb lock is not raw :/