From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753398AbdBKIAy (ORCPT ); Sat, 11 Feb 2017 03:00:54 -0500 Received: from mout.gmx.net ([212.227.15.18]:57331 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751150AbdBKIAw (ORCPT ); Sat, 11 Feb 2017 03:00:52 -0500 Message-ID: <1486800006.23339.2.camel@gmx.de> Subject: Re: [PATCH 2/2] sched/deadline: Throttle a constrained deadline task activated after the deadline From: Mike Galbraith To: luca abeni , Daniel Bristot de Oliveira Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Juri Lelli , Tommaso Cucinotta , Steven Rostedt Date: Sat, 11 Feb 2017 09:00:06 +0100 In-Reply-To: <20170211081526.4a215f7d@sweethome> References: <20170211081526.4a215f7d@sweethome> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:JRt2R7Xq9f97bc1in1wNleCI5Jyf8wCvcl2yUpFA07uG7rIlDSt bvvaK6SZ/POTreYhTZByKwrj5DgCJ53NWhNySdGx54tp+Qgp0RoKLiZp55XYW+Zo2PZqfOC z8qfu3TqU2Q+B+eI4DXCeTEt/Sl58tX9sjVY/5dYJgosTVAjo66MI2+TzsR8VMd/LfSFQdn 7P18W7tG+3DkXJi27ouXQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:2kjFMNeCFFg=:otdv8+uQSLiwDd+hCyGZc/ 9SKVDibBqNS6sGbqhItRY7r8ovY07tR2LT7S7ZMaDk/OGJH7pojaOi7rnodJMboFEOAP+sO0h ot98G/veN1a5IapXekOS2APL+jpPUPCnbwYqGnpRwUrNtn3Xn/2vn7004LMkIa5eSYf+CS/dS 3LzQofITFTTFlsXky8CcNt+OP0ACCjDBfQC8LNBJYiNn4tcug2JprkC8+nb808Xp7FCUNgmnO Jzm//pxIqPWmibdj9oHwYkO1F4JCLsTXmziUghnvi+bRJNTA8Y+s62S5R/RIn6jWKo6NUiPB8 /RkhIkWoFt9aR/b0tZ6UJTHuqEz9az7qJ6AbzNm4qVmyJ5SX0BW8ZHLWa7lF9EJ6d+APBz69H zKLgFCveyF2ex9dZuQDcwhc0YBOmZSM6UursDvtBCKSB6HiZvbznks63zLlaTzPxF4soipCOh Gs018a83dKSJQMXX+X0G5vymDcJ0/h3C9b+1g7C8HSyGTdvdQiB4FHFYIUyH6D7/S4edcHJvG rY9Wpzup2Pyka9kY4neRT2Ow6Me7jr15/vUO1qyLKD05qGazUcSStYVfjo3qytSGjLL7zYFKl qwmSRDLLUJ/PNQkQFYu57otz6g8ja66nFrbR6c6Mk05SELCgWEcBhXSiKuzGFIXWlqg1Qjcbl aOIV1W029J5s9UoPr4T/3SI7s2yZjYkDENuVrD7Oq6h79AuZMDIdAvfBoj3uHedSY7KwwDq0/ YyzZAOnspLnPHAa2GppdW6JA9UD4s9ZFNZhYdlT8rZTUhtcqzEIEsWpFwWWXf1iPEIJuooBCZ qQh3ppN Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2017-02-11 at 08:15 +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. Both of these should be tagged for stable as well, or? -Mike