From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753235AbcHOPmn (ORCPT ); Mon, 15 Aug 2016 11:42:43 -0400 Received: from foss.arm.com ([217.140.101.70]:41578 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752989AbcHOPml (ORCPT ); Mon, 15 Aug 2016 11:42:41 -0400 Date: Mon, 15 Aug 2016 16:42:37 +0100 From: Morten Rasmussen To: Peter Zijlstra Cc: mingo@redhat.com, dietmar.eggemann@arm.com, yuyang.du@intel.com, vincent.guittot@linaro.org, mgalbraith@suse.de, sgurrappadi@nvidia.com, freedom.tan@mediatek.com, keita.kobayashi.ym@renesas.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 10/13] sched/fair: Compute task/cpu utilization at wake-up more correctly Message-ID: <20160815154237.GE3391@e105550-lin.cambridge.arm.com> References: <1469453670-2660-1-git-send-email-morten.rasmussen@arm.com> <1469453670-2660-11-git-send-email-morten.rasmussen@arm.com> <20160815142342.GV6879@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160815142342.GV6879@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 15, 2016 at 04:23:42PM +0200, Peter Zijlstra wrote: > On Mon, Jul 25, 2016 at 02:34:27PM +0100, Morten Rasmussen wrote: > > To solve this problem, this patch introduces task_util_wake() which > > computes the decayed task utilization based on the last update of the > > previous cpu's last load-tracking update. It is done without having to > > take the rq lock, similar to how it is done in remove_entity_load_avg(). > > But unlike that function, it doesn't actually use __update_load_avg(). > Why not? Fair question :) We currently exploit the fact that the task utilization is _not_ updated in wake-up balancing to make sure we don't under-estimate the capacity requirements for tasks that have slept for a while. If we update it, we loose the non-decayed 'peak' utilization, but I guess we could just store it somewhere when we do the wake-up decay. I thought there was a better reason when I wrote the patch, but I don't recall right now. I will look into it again and see if we can use __update_load_avg() to do a proper update instead of doing things twice.