[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180730155933.GK2494@hirez.programming.kicks-ass.net>
Date: Mon, 30 Jul 2018 17:59:33 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "weiqi (C)" <weiqi4@...wei.com>
Cc: linux-kernel@...r.kernel.org,
Zhanghailiang <zhang.zhanghailiang@...wei.com>
Subject: Re: [Question] load balance move tasks not suitable ?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
On Mon, Jul 30, 2018 at 09:42:27PM +0800, weiqi (C) wrote:
> in latest linux kernel version, load-balance's detach_tasks() keeps
> "load/2" behavior:
>
> """
>
> if (( load / 2 ) > env->imbalance)
> goto next;
> """
>
> It means a task "p", which load is 1.5 times than "env->imbalance" can
> move from "src_rq" to "dst_rq".
> after this move, imbalance between "src_rq" and "dst_rq" may larger than
> before.
imbalance is how much we should move to get in balance. So if we move 1
imbalance we'll end up being just right. If we move 1.5 we end up
slightly better then before, but imbalanced the other way.
If we move 2 imbalance, we're exactly where we were, just the other way
around.
> but if use "load*2" here, It means we can pick a task "p" , which load is
> half of "env->imbalance", and after move,
> "src_rq" and "dst_rq" is balanced.
We might not move anything and not improve even if we could.
Powered by blists - more mailing lists