From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751337AbdJCIu3 (ORCPT ); Tue, 3 Oct 2017 04:50:29 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:49161 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156AbdJCIu2 (ORCPT ); Tue, 3 Oct 2017 04:50:28 -0400 Date: Tue, 3 Oct 2017 10:50:20 +0200 From: Peter Zijlstra To: Dietmar Eggemann 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 Subject: Re: [PATCH -v2 13/18] sched/fair: Propagate an effective runnable_load_avg Message-ID: <20171003085020.cztmctn2252mcu6k@hirez.programming.kicks-ass.net> References: <20170901132059.342024223@infradead.org> <20170901132748.630232806@infradead.org> <9ffc6acc-e0a5-ac01-8c5d-4d71a721fa7f@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ffc6acc-e0a5-ac01-8c5d-4d71a721fa7f@arm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. *