From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754828AbdEDO1R (ORCPT ); Thu, 4 May 2017 10:27:17 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49652 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752466AbdEDO0m (ORCPT ); Thu, 4 May 2017 10:26:42 -0400 Date: Thu, 4 May 2017 16:26:32 +0200 From: Peter Zijlstra To: Daniel Bristot de Oliveira Cc: Ingo Molnar , Xunlei Pang , Juri Lelli , Steven Rostedt , Luca Abeni , Tommaso Cucinotta , Romulo Silva de Oliveira , linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] sched/deadline: Use the revised wakeup rule for suspending constrained dl tasks Message-ID: <20170504142632.fdnwfqxcas7d3t7x@hirez.programming.kicks-ass.net> References: <5c6933890ea6daa3b4edb4983b0c6f094ad3903d.1493045834.git.bristot@redhat.com> <20170504141721.5f6tlayqwyq4cxnw@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170504141721.5f6tlayqwyq4cxnw@hirez.programming.kicks-ass.net> 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, May 04, 2017 at 04:17:21PM +0200, Peter Zijlstra wrote: > We use two difference CBS rules: > > 1) the original CBS rule for implicit deadline tasks; > 2) the revised CBS rule for constrained deadline tasks. > > @@ -500,6 +550,14 @@ static void update_dl_entity(struct sched_dl_entity *dl_se, > > > > if (dl_time_before(dl_se->deadline, rq_clock(rq)) || > > dl_entity_overflow(dl_se, pi_se, rq_clock(rq))) { > > + > > + if (unlikely(dl_is_constrained(dl_se) && > > + !dl_time_before(dl_se->deadline, rq_clock(rq)) && > > + !dl_se->dl_boosted)){ > > + update_dl_revised_wakeup(dl_se, rq); > > + return; > > + } > > + > > dl_se->deadline = rq_clock(rq) + pi_se->dl_deadline; > > dl_se->runtime = pi_se->dl_runtime; > > } That comment above does not match the code. We can still use the original CBS rule for constrained tasks. We only use the revised CBS rule when the constrained task hasn't missed its deadline yet.