From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755293AbcKBClm (ORCPT ); Tue, 1 Nov 2016 22:41:42 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35575 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755253AbcKBCll (ORCPT ); Tue, 1 Nov 2016 22:41:41 -0400 Date: Wed, 2 Nov 2016 03:41:28 +0100 From: luca abeni To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Juri Lelli , Claudio Scordino , Steven Rostedt Subject: Re: [RFC v3 2/6] Improve the tracking of active utilisation Message-ID: <20161102034128.4c647b53@utopia> In-Reply-To: <1477317998-7487-3-git-send-email-luca.abeni@unitn.it> References: <1477317998-7487-1-git-send-email-luca.abeni@unitn.it> <1477317998-7487-3-git-send-email-luca.abeni@unitn.it> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; 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 On Mon, 24 Oct 2016 16:06:34 +0200 Luca Abeni wrote: [...] > @@ -514,7 +556,20 @@ static void update_dl_entity(struct sched_dl_entity *dl_se, > struct dl_rq *dl_rq = dl_rq_of_se(dl_se); > struct rq *rq = rq_of_dl_rq(dl_rq); > > - add_running_bw(dl_se, dl_rq); > + if (hrtimer_is_queued(&dl_se->inactive_timer)) { > + hrtimer_try_to_cancel(&dl_se->inactive_timer); Replying to myself here: after re-readling this code again, I now think that if hrtimer_try_to_cancel() does not fail I need a put_task_struct() to compensate for the one that should happen in the inactive timer handler and I just cancelled... I do not know how I previously missed this (or maybe I just managed to confuse myself now :) I will check this in next week. Luca