From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751911AbdJCJ3c (ORCPT ); Tue, 3 Oct 2017 05:29:32 -0400 Received: from foss.arm.com ([217.140.101.70]:45974 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbdJCJ33 (ORCPT ); Tue, 3 Oct 2017 05:29:29 -0400 Subject: Re: [PATCH -v2 13/18] sched/fair: Propagate an effective runnable_load_avg To: Peter Zijlstra Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, tj@kernel.org, josef@toxicpanda.com, torvalds@linux-foundation.org, vincent.guittot@linaro.org, efault@gmx.de, pjt@google.com, clm@fb.com, morten.rasmussen@arm.com, bsegall@google.com, yuyang.du@intel.com References: <20170901132059.342024223@infradead.org> <20170901132748.630232806@infradead.org> <9ffc6acc-e0a5-ac01-8c5d-4d71a721fa7f@arm.com> <20171003085020.cztmctn2252mcu6k@hirez.programming.kicks-ass.net> From: Dietmar Eggemann Message-ID: <64f045cc-31f3-4194-c3ea-6ea11f52b798@arm.com> Date: Tue, 3 Oct 2017 10:29:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171003085020.cztmctn2252mcu6k@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/10/17 09:50, Peter Zijlstra wrote: > On Mon, Oct 02, 2017 at 06:46:32PM +0100, Dietmar Eggemann wrote: > >>> +/* >>> + * Recomputes the group entity based on the current state of its group >>> + * runqueue. >>> + */ >>> +static void update_cfs_group(struct sched_entity *se) >> >> update_cfs_share(s)() is still mentioned in the function header of >> update_tg_load_avg() and update_cfs_rq_load_avg(). >> >> Should we rename those comments with this patch? >> >> IMHO, the comment for update_tg_load_avg() is still true whereas the one >> for update_cfs_rq_load_avg() mentions cfs_rq->avg as >> cfs_rq->avg.load_avg (or cfs_rq_load_avg()) and update_cfs_group() >> doesn't use it anymore. It's now used in calc_group_runnable() and >> calc_group_shares() instead. >> >> [...] > > Right, so something like the below? Thinking that update_cfs_group() > immediately leads to calc_group_*() so no need to spell those out. Looks good to me, agreed. > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 350dbec01523..fee2e34812da 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -3333,7 +3333,7 @@ __update_load_avg_cfs_rq(u64 now, int cpu, struct cfs_rq *cfs_rq) > * differential update where we store the last value we propagated. This in > * turn allows skipping updates if the differential is 'small'. > * > - * Updating tg's load_avg is necessary before update_cfs_share(). > + * Updating tg's load_avg is necessary before update_cfs_group(). > */ > static inline void update_tg_load_avg(struct cfs_rq *cfs_rq, int force) > { > @@ -3601,7 +3601,7 @@ static inline void add_tg_cfs_propagate(struct cfs_rq *cfs_rq, long runnable_sum > * avg. The immediate corollary is that all (fair) tasks must be attached, see > * post_init_entity_util_avg(). > * > - * cfs_rq->avg is used for task_h_load() and update_cfs_share() for example. > + * cfs_rq->avg is used for task_h_load() and update_cfs_group() for example. > * > * Returns true if the load decayed or we removed load. > * >