From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754257AbdDMOkB (ORCPT ); Thu, 13 Apr 2017 10:40:01 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:41845 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446AbdDMOj6 (ORCPT ); Thu, 13 Apr 2017 10:39:58 -0400 Date: Thu, 13 Apr 2017 16:39:52 +0200 From: Peter Zijlstra To: Alex Shi Cc: mingo@redhat.com, corbet@lwn.net, "open list:LOCKING PRIMITIVES" , Steven Rostedt , Sebastian Siewior , Thomas Gleixner Subject: Re: [PATCH 2/3] rtmutex: deboost priority conditionally when rt-mutex unlock Message-ID: <20170413143952.ty4dw5mvyfnhaqgh@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1492092174-31734-3-git-send-email-alex.shi@linaro.org> 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 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.