From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752590AbdBMLNA (ORCPT ); Mon, 13 Feb 2017 06:13:00 -0500 Received: from merlin.infradead.org ([205.233.59.134]:59812 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752249AbdBMLM7 (ORCPT ); Mon, 13 Feb 2017 06:12:59 -0500 Date: Mon, 13 Feb 2017 12:12:57 +0100 From: Peter Zijlstra To: luca abeni Cc: Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli , Tommaso Cucinotta , Steven Rostedt Subject: Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline Message-ID: <20170213111257.GI6500@twins.programming.kicks-ass.net> References: <20170211081526.4a215f7d@sweethome> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170211081526.4a215f7d@sweethome> 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 Sat, Feb 11, 2017 at 08:15:26AM +0100, luca abeni wrote: > Hi Daniel, > > On Fri, 10 Feb 2017 20:48:11 +0100 > Daniel Bristot de Oliveira wrote: > > > During the activation, CBS checks if it can reuse the current task's > > runtime and period. If the deadline of the task is in the past, CBS > > cannot use the runtime, and so it replenishes the task. This rule > > works fine for implicit deadline tasks (deadline == period), and the > > CBS was designed for implicit deadline tasks. However, a task with > > constrained deadline (deadine < period) might be awakened after the > > deadline, but before the next period. In this case, replenishing the > > task would allow it to run for runtime / deadline. As in this case > > deadline < period, CBS enables a task to run for more than the > > runtime/period. In a very load system, this can cause the domino > > effect, making other tasks to miss their deadlines. > > I think you are right: SCHED_DEADLINE implements the original CBS > algorithm here, but uses relative deadlines different from periods in > other places (while the original algorithm only considered relative > deadlines equal to periods). > An this mix is dangerous... I think your fix is correct, and cures a > real problem. > Made that a "Reviewed-by:" tag in your name again.