Messages in this thread | | | Date | Tue, 18 Nov 2008 09:27:14 -0800 | Subject | Re: busted CFS group load balancer? | From | Ken Chen <> |
| |
On Tue, Nov 18, 2008 at 4:30 AM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote: >> I'm also very troubled with this calculation in __update_group_shares_cpu(): >> >> shares = (sd_shares * rq_weight) / (sd_rq_weight + 1); >> >> Won't you have rounding problem here? value 'shares' will gradually >> decrease for each iteration of __update_group_shares_cpu()? > > Yes it will, however at the top of the sched-domain tree its reset. > > if (!sd->parent || !(sd->parent->flags & SD_LOAD_BALANCE)) > shares = tg->shares;
Hmm? it is only true mostly on flat smp machine, or on numa system where task is woken up across a sched-domain.
There is this code in try_to_wake_up():
for_each_domain(this_cpu, sd) { if (cpu_isset(cpu, sd->span)) { update_shares(sd); break; } }
It doesn't iterate to the top half of the time on numa machine.
- Ken
| |