public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "weiqi (C)" <weiqi4@huawei.com>
Cc: linux-kernel@vger.kernel.org,
	Zhanghailiang <zhang.zhanghailiang@huawei.com>
Subject: Re: [Question] load balance move tasks not suitable ?
Date: Mon, 30 Jul 2018 14:56:06 +0200	[thread overview]
Message-ID: <20180730125606.GP2476@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <6e782fa5-de1d-93a9-ed11-5b43b65b20c9@huawei.com>

On Mon, Jul 30, 2018 at 08:08:55PM +0800, weiqi (C) wrote:
> Hi Peter,
> 
> After  Commits 5d6523ebd(sched: Fix load-balance wreckage),

That's a _6_ year old patch... and I can barely remember last week.

> The jugement whether imbalance reached changed from twice to one-half.
> 
> 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.

It basically goes back to what it was before (see 367456c), in that
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.

       reply	other threads:[~2018-07-30 12:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6e782fa5-de1d-93a9-ed11-5b43b65b20c9@huawei.com>
2018-07-30 12:56 ` Peter Zijlstra [this message]
2018-07-30 13:42   ` [Question] load balance move tasks not suitable ? weiqi (C)
2018-07-30 15:59     ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180730125606.GP2476@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiqi4@huawei.com \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox