From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754023AbdDMQV2 (ORCPT ); Thu, 13 Apr 2017 12:21:28 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:38509 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751573AbdDMQVZ (ORCPT ); Thu, 13 Apr 2017 12:21:25 -0400 Date: Thu, 13 Apr 2017 18:21:13 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: Alex Shi , mingo@redhat.com, corbet@lwn.net, "open list:LOCKING PRIMITIVES" , Sebastian Siewior , Thomas Gleixner Subject: Re: [PATCH 2/3] rtmutex: deboost priority conditionally when rt-mutex unlock Message-ID: <20170413162113.wgtli7v5hp6ersyb@hirez.programming.kicks-ass.net> References: <1492092174-31734-1-git-send-email-alex.shi@linaro.org> <1492092174-31734-3-git-send-email-alex.shi@linaro.org> <20170413143952.ty4dw5mvyfnhaqgh@hirez.programming.kicks-ass.net> <20170413120925.76e22c03@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170413120925.76e22c03@gandalf.local.home> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 13, 2017 at 12:09:25PM -0400, Steven Rostedt wrote: > On Thu, 13 Apr 2017 16:39:52 +0200 > Peter Zijlstra wrote: > > > On Thu, Apr 13, 2017 at 10:02:53PM +0800, Alex Shi wrote: > > > /* > > > + * 'current' release this lock, so 'current' should be a higher prio > > > + * task than the next top waiter, unless the current prio was gotten > > > + * from this top waiter, iff so, we need to deboost 'current' after > > > + * the lock release. > > > + */ > > > + if (current->prio == waiter->prio) > > > + deboost = true; > > > > This is wrong. > > The comment is, especially that "iff". What if current and waiter > happen to have the same priority? Then it too doesn't need to be > deboosted. The wrongness is in comparing prio and thinking it means anything.