From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757325AbcBJLnn (ORCPT ); Wed, 10 Feb 2016 06:43:43 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33454 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753657AbcBJLnl (ORCPT ); Wed, 10 Feb 2016 06:43:41 -0500 Date: Wed, 10 Feb 2016 12:43:34 +0100 From: luca abeni To: Juri Lelli Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org, wanpeng.li@hotmail.com Subject: Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth Message-ID: <20160210124334.0c44e3ec@utopia> In-Reply-To: <20160210113258.GX11415@e106622-lin> References: <1454935531-7541-1-git-send-email-juri.lelli@arm.com> <1454935531-7541-2-git-send-email-juri.lelli@arm.com> <20160210113258.GX11415@e106622-lin> Organization: university of trento X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; 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 Hi all, On Wed, 10 Feb 2016 11:32:58 +0000 Juri Lelli wrote: [...] > @@ -2445,14 +2445,18 @@ static int dl_overflow(struct task_struct *p, > int policy, if (dl_policy(policy) && !task_has_dl_policy(p) && > !__dl_overflow(dl_b, cpus, 0, new_bw)) { > __dl_add(dl_b, new_bw); > + __dl_add_ac(task_rq(p), new_bw); > err = 0; > } else if (dl_policy(policy) && task_has_dl_policy(p) && > !__dl_overflow(dl_b, cpus, p->dl.dl_bw, new_bw)) { > __dl_clear(dl_b, p->dl.dl_bw); > + __dl_sub_ac(task_rq(p), p->dl.dl_bw); > __dl_add(dl_b, new_bw); > + __dl_add_ac(task_rq(p), new_bw); > err = 0; > } else if (!dl_policy(policy) && task_has_dl_policy(p)) { > __dl_clear(dl_b, p->dl.dl_bw); > + __dl_sub_ac(task_rq(p), p->dl.dl_bw); Instead of adding __dl_add_ac() and __dl_sub_ac) calls here, maybe they can be added in switched_to_dl() and switched_from_dl()? I'll test this idea locally, and I'll send an updated patch if it works. Luca