From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbcFFNat (ORCPT ); Mon, 6 Jun 2016 09:30:49 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:38831 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751360AbcFFNas (ORCPT ); Mon, 6 Jun 2016 09:30:48 -0400 Date: Mon, 6 Jun 2016 14:30:45 +0100 From: Matt Fleming To: Yuyang Du Cc: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, bsegall@google.com, pjt@google.com, morten.rasmussen@arm.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com Subject: Re: [PATCH v4 1/5] sched/fair: Clean up attach_entity_load_avg() Message-ID: <20160606133045.GR2658@codeblueprint.co.uk> References: <1465172441-27727-1-git-send-email-yuyang.du@intel.com> <1465172441-27727-2-git-send-email-yuyang.du@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465172441-27727-2-git-send-email-yuyang.du@intel.com> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 06 Jun, at 08:20:37AM, Yuyang Du wrote: > attach_entity_load_avg() is called (indirectly) from: > > - switched_to_fair(): switch between classes to fair > - task_move_group_fair(): move between task groups > - enqueue_entity_load_avg(): enqueue entity > > Only in switched_to_fair() is it possible that the task's last_update_time > is not 0 and therefore the task needs sched avgs update, so move the task > sched avgs update to switched_to_fair() only. In addition, the code is > refactored and code comments are updated. > > No functionality change. > > Signed-off-by: Yuyang Du > --- > kernel/sched/fair.c | 43 ++++++++++++++++++++----------------------- > 1 file changed, 20 insertions(+), 23 deletions(-) What about when tasks are moved between groups on CONFIG_SMP=n ? Doesn't this change fail to age the load in that case?