From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751872AbcF0MmR (ORCPT ); Mon, 27 Jun 2016 08:42:17 -0400 Received: from www.linutronix.de ([62.245.132.108]:32982 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601AbcF0MmQ (ORCPT ); Mon, 27 Jun 2016 08:42:16 -0400 Date: Mon, 27 Jun 2016 14:40:02 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra cc: Juri Lelli , mingo@kernel.org, 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 8/8] rtmutex: Fix PI chain order integrity In-Reply-To: <20160627122335.GB30154@twins.programming.kicks-ass.net> Message-ID: References: <20160607195635.710022345@infradead.org> <20160607200216.117270606@infradead.org> <20160614173908.GQ5981@e106622-lin> <20160614194401.GL30921@twins.programming.kicks-ass.net> <20160615072507.GS5981@e106622-lin> <20160627122335.GB30154@twins.programming.kicks-ass.net> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Jun 2016, Peter Zijlstra wrote: > On Wed, Jun 15, 2016 at 08:25:07AM +0100, Juri Lelli wrote: > > I guess it's not that likely, but yes it could potentially happen that a > > waiter is optimistically spinning, depletes its runtime, gets throttled > > and then replenished when still spinning. Maybe it doesn't really make > > sense continuing spinning in this situation, but I guess things get > > really complicated. :-/ > > > > Anyway, as said, I think this patch is OK. Maybe we want to add a > > comment just to remember what situation can cause an issue if we don't > > do this? Patch changelog would be OK as well for such a comment IMHO. > > > OK, so I went to write a simple comment and ended up with the below :/ > > While writing the comment I noticed two issues: > > - we update the waiter order fields while the entry is still enqueued > on the pi_waiters tree, which is also sorted by these exact fields. > > - another one of these pure ->prio comparisons > > Please double check, there be dragons here. Reviewed-by: Thomas Gleixner