From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753547AbdBJTs3 (ORCPT ); Fri, 10 Feb 2017 14:48:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38796 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752697AbdBJTs2 (ORCPT ); Fri, 10 Feb 2017 14:48:28 -0500 From: Daniel Bristot de Oliveira To: linux-kernel@vger.kernel.org Cc: Daniel Bristot de Oliveira , Ingo Molnar , Peter Zijlstra , Juri Lelli , Tommaso Cucinotta , Luca Abeni , Steven Rostedt Subject: [PATCH 0/2] sched/deadline: Fixes for constrained deadline tasks Date: Fri, 10 Feb 2017 20:48:09 +0100 Message-Id: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 10 Feb 2017 19:48:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While reading sched deadline code, I find out that a constrained deadline task could be replenished before the next period if activated after the deadline, opening the window to run for more than Q/P. The patch [2] explains and fixes this problem. Furthermore, while fixing this issue, I found that the replenishment timer was being fired at the deadline of the task. This works fine for implicit deadline tasks (deadline == period) because the deadline is at the same point in time of the next period. But that is not true for constrained deadline tasks (deadline < period). This problem is not as visible as the first because the runtime leakage takes place only in the second activation. Next activations receive the correct bandwidth. However, after the 2nd activation, tasks are activated in the (period - dl_deadline) instant, which is before the expected activation. This problem is explained in the fix description as well. Daniel Bristot de Oliveira (2): sched/deadline: Replenishment timer should fire in the next period sched/deadline: Throttle a constrained deadline task activated after the deadline kernel/sched/deadline.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) -- 2.9.3