Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753995AbcKROzH (ORCPT ); Fri, 18 Nov 2016 09:55:07 -0500 Received: from merlin.infradead.org ([205.233.59.134]:46250 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753153AbcKROzF (ORCPT ); Fri, 18 Nov 2016 09:55:05 -0500 Date: Fri, 18 Nov 2016 15:55:03 +0100 From: Peter Zijlstra To: Juri Lelli Cc: luca abeni , linux-kernel@vger.kernel.org, Ingo Molnar , Claudio Scordino , Steven Rostedt Subject: Re: [RFC v3 1/6] Track the active utilisation Message-ID: <20161118145503.GL3142@twins.programming.kicks-ass.net> References: <1477317998-7487-1-git-send-email-luca.abeni@unitn.it> <1477317998-7487-2-git-send-email-luca.abeni@unitn.it> <20161101164451.GA2769@ARMvm> <20161101221014.27eb441a@utopia> <20161108175635.GF16920@e106622-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161108175635.GF16920@e106622-lin> 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: 618 Lines: 16 On Tue, Nov 08, 2016 at 05:56:35PM +0000, Juri Lelli wrote: > Mmm. You explicitly check that TASK_ON_RQ_MIGRATING or DEQUEUE_SLEEP > (which btw can be actually put together with an or condition), so I > don't think that any of those turn out to be true when the task dies. > Also, AFAIU, do_exit() works on current and the TASK_DEAD case is > handled in finish_task_switch(), so I don't think we are taking care of > the "task is dying" condition. > > Peter, does what I'm saying make any sense? :) do_task_dead(): __set_current_state(TASK_DEAD); schedule(): if (prev->state) deactivate_task(DEQUEUE_SLEEP);