Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754177AbcKRSuF (ORCPT ); Fri, 18 Nov 2016 13:50:05 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:41355 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752057AbcKRSt7 (ORCPT ); Fri, 18 Nov 2016 13:49:59 -0500 Date: Fri, 18 Nov 2016 19:49:57 +0100 From: Peter Zijlstra To: luca abeni Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli , Claudio Scordino , Steven Rostedt Subject: Re: [RFC v3 2/6] Improve the tracking of active utilisation Message-ID: <20161118184957.GV3117@twins.programming.kicks-ass.net> References: <1477317998-7487-1-git-send-email-luca.abeni@unitn.it> <1477317998-7487-3-git-send-email-luca.abeni@unitn.it> <20161118154748.GN3142@twins.programming.kicks-ass.net> <20161118170650.50932614@sweethome> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161118170650.50932614@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 Content-Length: 758 Lines: 15 On Fri, Nov 18, 2016 at 05:06:50PM +0100, luca abeni wrote: > > > Also, what happens when hrtimer_try_to_cancel() fails? > > This is something I am working on... My original idea was that nothing > bad happens, because the timer handler will see the task as RUNNING and > will not decrease the running bw... But this is wrong. > My new idea is to add a "dl_contending" flag in the scheduling entity, > that indicates if the running bw has already been subtracted or not. > With this, the issue should be solved (if anyone sees additional > issues, or a better solution that does not require an additional flag, > let me know). Right. My suggestion would be to make it obvious, use that flag if that's what it takes. We can always try and be clever later.