From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752950AbcFOQaQ (ORCPT ); Wed, 15 Jun 2016 12:30:16 -0400 Received: from smtprelay0239.hostedemail.com ([216.40.44.239]:39594 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751061AbcFOQaN (ORCPT ); Wed, 15 Jun 2016 12:30:13 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:967:973:988:989:1260:1263:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2525:2553:2560:2563:2682:2685:2693:2859:2898:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3870:3871:3872:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:4605:5007:6261:7576:7875:7903:9025:10004:10400:10473:10848:10913:10967:11026:11232:11658:11914:12043:12294:12438:12517:12519:12555:12740:12783:13255:13439:13846:14094:14096:14181:14659:14721:19900:21080:21324:21433,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:4,LUA_SUMMARY:none X-HE-Tag: party46_1e703c9cc232d X-Filterd-Recvd-Size: 3038 Date: Wed, 15 Jun 2016 12:30:07 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: mingo@kernel.org, tglx@linutronix.de, juri.lelli@arm.com, 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: <20160615123007.728b088c@grimm.local.home> In-Reply-To: <20160607200215.788266764@infradead.org> References: <20160607195635.710022345@infradead.org> <20160607200215.788266764@infradead.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; 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 Tue, 07 Jun 2016 21:56:38 +0200 Peter Zijlstra wrote: > From: Xunlei Pang > > Currently dl tasks will actually return at the very beginning > of rt_mutex_adjust_prio_chain() in !detect_deadlock cases: > > if (waiter->prio == task->prio) { > if (!detect_deadlock) > goto out_unlock_pi; // out here > else > requeue = false; > } > > As the deadline value of blocked deadline tasks(waiters) without > changing their sched_class(thus prio doesn't change) never changes, > this seems reasonable, but it actually misses the chance of updating > rt_mutex_waiter's "dl_runtime(period)_copy" if a waiter updates its > deadline parameters(dl_runtime, dl_period) or boosted waiter changes > to !deadline class. > > Thus, force deadline task not out by adding the !dl_prio() condition. > > [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] > > Cc: Steven Rostedt > Cc: Ingo Molnar > Cc: Thomas Gleixner > Cc: Juri Lelli > Signed-off-by: Xunlei Pang > Signed-off-by: Peter Zijlstra (Intel) > Link: http://lkml.kernel.org/r/1460633827-345-7-git-send-email-xlpang@redhat.com > --- > kernel/locking/rtmutex.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/kernel/locking/rtmutex.c > +++ 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)) { Isn't task the owner of the lock? What happens if the waiter is a deadline task? -- Steve > if (!detect_deadlock) > goto out_unlock_pi; > else >