lkml.org 
[lkml]   [2019]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/14] sched,fair: refactor enqueue/dequeue_entity
On Wed, Jul 31, 2019 at 11:03:01AM -0400, Rik van Riel wrote:

> I think I understand the problem you are pointing out, but if
> update_load_avg() keeps the load average for the runqueue unchanged
> (because that is rate limited to once a jiffy, and has been like that
> for a while), why would calc_group_shares() result in a different
> value than what it returned the last time?
>
> What am I overlooking?

I'm thinking you're thinking (3):

tg->weight * grq->avg.load_avg
shares = ------------------------------
tg->load_avg

Where: tg->load_avg ~= \Sum grq->avg.load_avg


Which is the straight forward shares calculation, and purely depends on
the load averages (which haven't been changed etc..)

But what we actually do is (6):

tg->weight * grq->avg.load_avg
shares = ---------------------------------------------------------------------------
tg->load_avg - grq->avg.load_avg + max(grq->load.weight, grq->avg.load_avg)

And even if tg->load_avg and grq->avg.load_avg haven't changed,
grq->load.weight most certainly has.


\
 
 \ /
  Last update: 2019-07-31 17:30    [W:0.059 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site