[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171003085020.cztmctn2252mcu6k@hirez.programming.kicks-ass.net>
Date: Tue, 3 Oct 2017 10:50:20 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Dietmar Eggemann <dietmar.eggemann@....com>
Cc: mingo@...nel.org, linux-kernel@...r.kernel.org, tj@...nel.org,
josef@...icpanda.com, torvalds@...ux-foundation.org,
vincent.guittot@...aro.org, efault@....de, pjt@...gle.com,
clm@...com, morten.rasmussen@....com, bsegall@...gle.com,
yuyang.du@...el.com
Subject: Re: [PATCH -v2 13/18] sched/fair: Propagate an effective
runnable_load_avg
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.
*
Powered by blists - more mailing lists