From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751893AbcFFIqD (ORCPT ); Mon, 6 Jun 2016 04:46:03 -0400 Received: from foss.arm.com ([217.140.101.70]:34523 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbcFFIqB (ORCPT ); Mon, 6 Jun 2016 04:46:01 -0400 Subject: Re: [RFC PATCH 2/3] sched/fair: Sync se with root cfs_rq To: Leo Yan References: <1464809962-25814-1-git-send-email-dietmar.eggemann@arm.com> <1464809962-25814-3-git-send-email-dietmar.eggemann@arm.com> <20160606025952.GB27287@leoy-linaro> Cc: Peter Zijlstra , linux-kernel@vger.kernel.org, Vincent Guittot , Ben Segall , Morten Rasmussen , Yuyang Du From: Dietmar Eggemann Message-ID: <57553846.50007@arm.com> Date: Mon, 6 Jun 2016 09:45:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160606025952.GB27287@leoy-linaro> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/06/16 03:59, Leo Yan wrote: > On Wed, Jun 01, 2016 at 08:39:21PM +0100, Dietmar Eggemann wrote: [...] >> @@ -2995,8 +2997,16 @@ static void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *s >> if (!entity_is_task(se)) >> return; >> >> - rq_of(cfs_rq)->cfs.avg.util_avg += se->avg.util_avg; >> - rq_of(cfs_rq)->cfs.avg.util_sum += se->avg.util_sum; >> + root_cfs_rq = &rq_of(cfs_rq)->cfs; >> + >> + if (parent_entity(se)) >> + __update_load_avg(cfs_rq_clock_task(root_cfs_rq), >> + cpu_of(rq_of(root_cfs_rq)), &root_cfs_rq->avg, >> + scale_load_down(root_cfs_rq->load.weight), >> + upd_util_cfs_rq(root_cfs_rq), root_cfs_rq); > > Maybe add below macro in this patch for more readable: > #define upd_util_cfs_rq(cfs_rq) XXX Sorry, this doesn't belong here since the macro is only introduced in 3/3. Should be 'root_cfs_rq->curr != NULL' here instead. [...]