From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822AbcFNMLm (ORCPT ); Tue, 14 Jun 2016 08:11:42 -0400 Received: from merlin.infradead.org ([205.233.59.134]:36236 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751029AbcFNMLl (ORCPT ); Tue, 14 Jun 2016 08:11:41 -0400 Date: Tue, 14 Jun 2016 14:11:33 +0200 From: Peter Zijlstra To: Matt Fleming Cc: Yuyang Du , 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: <20160614121133.GF30921@twins.programming.kicks-ass.net> 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.23.1 (2014-03-12) 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 So I still wonder at the point of this patch, since the next patch deletes this code entirely. What's the point of cleaning it up if the next patch removes it out-right.