From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752237AbcFNMJU (ORCPT ); Tue, 14 Jun 2016 08:09:20 -0400 Received: from merlin.infradead.org ([205.233.59.134]:36227 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751140AbcFNMJS (ORCPT ); Tue, 14 Jun 2016 08:09:18 -0400 Date: Tue, 14 Jun 2016 14:09:10 +0200 From: Peter Zijlstra To: Juri Lelli Cc: mingo@kernel.org, tglx@linutronix.de, rostedt@goodmis.org, xlpang@redhat.com, linux-kernel@vger.kernel.org, mathieu.desnoyers@efficios.com, jdesfossez@efficios.com, bristot@redhat.com, Ingo Molnar Subject: Re: [RFC][PATCH 3/8] sched/deadline/rtmutex: Dont miss the dl_runtime/dl_period update Message-ID: <20160614120910.GE30921@twins.programming.kicks-ass.net> References: <20160607195635.710022345@infradead.org> <20160607200215.788266764@infradead.org> <20160614104339.GG5981@e106622-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160614104339.GG5981@e106622-lin> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 14, 2016 at 11:43:39AM +0100, Juri Lelli wrote: > > [peterz: I should introduce more task state comparators like > > rt_mutex_waiter_less, all PI prio comparisons already have this DL > > exception, except this one] > > +++ b/kernel/locking/rtmutex.c > > @@ -488,7 +488,7 @@ static int rt_mutex_adjust_prio_chain(st > > * enabled we continue, but stop the requeueing in the chain > > * walk. > > */ > > - if (waiter->prio == task->prio) { > > + if (waiter->prio == task->prio && !dl_task(task)) { > > Right. Do we want a rt_mutex_waiter_equal() helper? As I think the > comment in the changelog was also saying? rt_mutex_waiter_equal() isn't going to help; it will not work on code that doesn't have access to rt_mutex_waiter thingies, like rt_mutex_setprio() for example. Then again, I already wondered about making rt_mutex_waiter available to sched code, but tglx didn't much like that iirc. Esp. given the last patch in this series, I wondered if perhaps the second argument to rt_mutex_setprio() should be a struct rt_mutex_waiter, instead of struct task_struct.