From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753561AbdDMQvv (ORCPT ); Thu, 13 Apr 2017 12:51:51 -0400 Received: from merlin.infradead.org ([205.233.59.134]:53698 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752737AbdDMQvt (ORCPT ); Thu, 13 Apr 2017 12:51:49 -0400 Date: Thu, 13 Apr 2017 18:51:42 +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: <20170413165142.7g2xsnklhjpkstx2@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> <20170413162113.wgtli7v5hp6ersyb@hirez.programming.kicks-ass.net> <20170413124014.63177422@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170413124014.63177422@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:40:14PM -0400, Steven Rostedt wrote: > On Thu, 13 Apr 2017 18:21:13 +0200 > Peter Zijlstra wrote: > > > 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. > > Because of deadline scheduling? Yep.