lkml.org 
[lkml]   [2019]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 03/14] sched,fair: redefine runnable_load_avg as the sum of task_h_load
From
Date
On Mon, 2019-07-29 at 22:05 +0200, Peter Zijlstra wrote:
> On Mon, Jul 22, 2019 at 01:33:37PM -0400, Rik van Riel wrote:
> > @@ -3012,25 +2983,24 @@ static inline int
> > throttled_hierarchy(struct cfs_rq *cfs_rq);
> > static void update_cfs_group(struct sched_entity *se)
> > {
> > struct cfs_rq *gcfs_rq = group_cfs_rq(se);
> > - long shares, runnable;
> > + long shares;
> >
> > - if (!gcfs_rq)
> > + if (!gcfs_rq) {
> > + update_runnable_load_avg(se);
> > return;
> > + }
> >
> > if (throttled_hierarchy(gcfs_rq))
> > return;
> >
> > #ifndef CONFIG_SMP
> > - runnable = shares = READ_ONCE(gcfs_rq->tg->shares);
> > -
> > if (likely(se->load.weight == shares))
>
> I'm thinking this uses @shares uninitialized...

Oops indeed. Let me put the shares = assignment
back for the !SMP case, and edit that comment.

> > return;
> > #else
> > shares = calc_group_shares(gcfs_rq);
> > - runnable = calc_group_runnable(gcfs_rq, shares);
> > #endif
> >
> > - reweight_entity(cfs_rq_of(se), se, shares, runnable);
> > + reweight_entity(cfs_rq_of(se), se, shares);
> > }
--
All Rights Reversed.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-07-29 23:15    [W:0.067 / U:37.616 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site