From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751782AbcFNMdD (ORCPT ); Tue, 14 Jun 2016 08:33:03 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:41203 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbcFNMdB (ORCPT ); Tue, 14 Jun 2016 08:33:01 -0400 Date: Tue, 14 Jun 2016 14:32:53 +0200 From: Peter Zijlstra To: Juri Lelli Cc: mingo@kernel.org, tglx@linutronix.de, rostedt@goodmis.org, xlpang@redhat.com, linux-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, jdesfossez@efficios.com, bristot@redhat.com Subject: Re: [RFC][PATCH 5/8] rtmutex: Clean up Message-ID: <20160614123253.GH30921@twins.programming.kicks-ass.net> References: <20160607195635.710022345@infradead.org> <20160607200215.923213194@infradead.org> <20160614120813.GH5981@e106622-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160614120813.GH5981@e106622-lin> 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 Tue, Jun 14, 2016 at 01:08:13PM +0100, Juri Lelli wrote: > > + postunlock = rt_mutex_futex_unlock(&pi_state->pi_mutex, &wake_q); > > > > /* > > * First unlock HB so the waiter does not spin on it once he got woken > > + * up. Then wakeup the waiter by calling rt_mutex_postunlock(). Priority > > + * is already adjusted and preemption is disabled to avoid inversion. > > */ > > spin_unlock(&hb->lock); > > > > + if (postunlock) > > + rt_mutex_postunlock(&wake_q); > > I'm most probably missing something, but don't we still need to call > wake_up_q() even when postunlock is false? IIUC, we were always doing > that, rt_mutex_postunlock(), before this change (only calling > preempt_enable() was conditional). Note that rt_mutex_slowunlock() only uses wake_q on the true path. When it returns false, it will not have placed a task to wake up.