From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754637AbdDMQkY (ORCPT ); Thu, 13 Apr 2017 12:40:24 -0400 Received: from mail.kernel.org ([198.145.29.136]:56564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751242AbdDMQkT (ORCPT ); Thu, 13 Apr 2017 12:40:19 -0400 Date: Thu, 13 Apr 2017 12:40:14 -0400 From: Steven Rostedt To: Peter Zijlstra 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: <20170413124014.63177422@gandalf.local.home> In-Reply-To: <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> <20170413162113.wgtli7v5hp6ersyb@hirez.programming.kicks-ass.net> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Steve