From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752898AbcFOGPt (ORCPT ); Wed, 15 Jun 2016 02:15:49 -0400 Received: from mga14.intel.com ([192.55.52.115]:10234 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752741AbcFOGPr (ORCPT ); Wed, 15 Jun 2016 02:15:47 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,474,1459839600"; d="scan'208";a="828342252" Date: Wed, 15 Jun 2016 06:18:56 +0800 From: Yuyang Du To: Matt Fleming 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 v5 1/5] sched/fair: Clean up attach_entity_load_avg() Message-ID: <20160614221856.GJ8105@intel.com> References: <1465427754-28897-1-git-send-email-yuyang.du@intel.com> <1465427754-28897-2-git-send-email-yuyang.du@intel.com> <20160614111152.GG2658@codeblueprint.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160614111152.GG2658@codeblueprint.co.uk> 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 Tue, Jun 14, 2016 at 12:11:52PM +0100, Matt Fleming wrote: > On Thu, 09 Jun, at 07:15:50AM, 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(-) > > Looks OK to me and makes the code easier to understand. Chasing > ->avg.last_update_time values is tricky at the best of times. > > Reviewed-by: Matt Fleming Thanks, Matt.