Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758738AbcDERQ3 (ORCPT ); Tue, 5 Apr 2016 13:16:29 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:34164 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753653AbcDERQ2 (ORCPT ); Tue, 5 Apr 2016 13:16:28 -0400 Date: Tue, 5 Apr 2016 19:16:19 +0200 From: luca abeni To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli Subject: Re: [RFC v2 4/7] Fix the update of the total -deadline utilization Message-ID: <20160405191619.7d3f45d9@utopia> In-Reply-To: <20160405125859.GY3430@twins.programming.kicks-ass.net> References: <1459523553-29089-1-git-send-email-luca.abeni@unitn.it> <1459523553-29089-5-git-send-email-luca.abeni@unitn.it> <20160405125859.GY3430@twins.programming.kicks-ass.net> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; i686-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 Content-Length: 1548 Lines: 42 Hi Peter, On Tue, 5 Apr 2016 14:58:59 +0200 Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 05:12:30PM +0200, Luca Abeni wrote: > > + /* > > + * XXX this is slightly incorrect: when the task > > + * utilization decreases, we should delay the total > > + * utilization change until the task's 0-lag point. > > + * But this would require to set the task's "inactive > > + * timer" when the task is not inactive. > > + */ > > Could you quickly remind me why this is a problem? Do you mean, why it is a problem to activate the "inactive timer" when the task is inactive? I designed inactive_task_timer() to be executed when the task is not active (for example, if the task's state is TASK_RUNNING inactive_task_timer() returns without doing anything). One problem could be that inactive_task_timer() decreases the utilisation of the task's rq (I am beginning to wonder if using the task's rq instead of the rq of the CPU on which the timer is running is a good idea, BTW); if the task is running, it can migrate to a different rq and inactive_task_timer() will decrease the wrong utilisation. Or do you mean why updating the utilisation now is a problem? This is slightly incorrect because decreasing the utilisation too early we risk to admit tasks that create a transient overload (with some unexpected deadline misses). Or did I misunderstand your question? Thanks, Luca > The timeline does > continue running right? So even if the task isn't active now, it will > still reach its 0-lag point.