On Mon, Jul 30, 2018 at 08:08:55PM +0800, weiqi (C) wrote:
Hi Peter,That's a _6_ year old patch... and I can barely remember last week.
After Commits 5d6523ebd(sched: Fix load-balance wreckage)ï
The jugement whether imbalance reached changed from twice to one-half.It basically goes back to what it was before (see 367456c), in that
from
(1) if((load * 2)> rem_load_move)
goto next;
to
(2) if((load / 2)> env-> load_move)
goto next;
I'm confused about this change.
"load*2" may be more appropriate, because if a task whose load more than
env->imbalance is moved from high load cpu to low load cpu,
will make more imbalance.
patch I (inadvertently) replaced (load.weight >> 1) with (load * 2)
instead of (load / 2).
I'm not entirely sure I can explain that logic at this time. Doing
software archeology on it might clarify where it came from.
.