Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758353AbcDEMXe (ORCPT ); Tue, 5 Apr 2016 08:23:34 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:33562 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757604AbcDEMXd (ORCPT ); Tue, 5 Apr 2016 08:23:33 -0400 Date: Tue, 5 Apr 2016 14:23:27 +0200 From: Peter Zijlstra To: Luca Abeni Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli Subject: Re: [RFC v2 1/7] Track the active utilisation Message-ID: <20160405122327.GU3430@twins.programming.kicks-ass.net> References: <1459523553-29089-1-git-send-email-luca.abeni@unitn.it> <1459523553-29089-2-git-send-email-luca.abeni@unitn.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1459523553-29089-2-git-send-email-luca.abeni@unitn.it> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 779 Lines: 22 On Fri, Apr 01, 2016 at 05:12:27PM +0200, Luca Abeni wrote: > @@ -1210,6 +1232,8 @@ static void task_fork_dl(struct task_struct *p) > static void task_dead_dl(struct task_struct *p) > { > struct dl_bw *dl_b = dl_bw_of(task_cpu(p)); > + struct dl_rq *dl_rq = dl_rq_of_se(&p->dl); > + struct rq *rq = rq_of_dl_rq(dl_rq); > > /* > * Since we are TASK_DEAD we won't slip out of the domain! > @@ -1218,6 +1242,9 @@ static void task_dead_dl(struct task_struct *p) > /* XXX we should retain the bw until 0-lag */ > dl_b->total_bw -= p->dl.dl_bw; > raw_spin_unlock_irq(&dl_b->lock); > + > + if (task_on_rq_queued(p)) > + sub_running_bw(&p->dl, &rq->dl); > } > A dead task cannot be running, not be queued, right? ISTR you remove this hunk in a later patch as well.