public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Vladimir Davydov <vdavydov@parallels.com>
Cc: Ingo Molnar <mingo@kernel.org>, Paul Turner <pjt@google.com>,
	linux-kernel@vger.kernel.org, devel@openvz.org
Subject: Re: [PATCH 1/2] sched: calculate_imbalance: Fix local->avg_load > sds->avg_load case
Date: Mon, 16 Sep 2013 10:11:32 +0200	[thread overview]
Message-ID: <20130916081132.GP21832@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <5236BBF0.8030505@parallels.com>

On Mon, Sep 16, 2013 at 12:06:08PM +0400, Vladimir Davydov wrote:
> On 09/16/2013 09:52 AM, Peter Zijlstra wrote:
> >On Sun, Sep 15, 2013 at 05:49:13PM +0400, Vladimir Davydov wrote:

> >>-	if (busiest->avg_load < sds->avg_load) {
> >>+	if (busiest->avg_load <= sds->avg_load ||
> >>+	    local->avg_load >= sds->avg_load) {
> >>  		env->imbalance = 0;
> >>  		return fix_small_imbalance(env, sds);
> >>  	}
> >Why the = part? Surely 'busiest->avg_load < sds->avg_load ||
> >local->avg_load > sds->avg_load' avoids both underflows?
> 
> Of course it does, but env->imbalance will be assigned to 0 anyway in =
> case, so why not go shortcut?

D'uh right.. hadn't had my morning juice yet.

  reply	other threads:[~2013-09-16  8:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-15 13:49 [PATCH 1/2] sched: calculate_imbalance: Fix local->avg_load > sds->avg_load case Vladimir Davydov
2013-09-15 13:49 ` [PATCH 2/2] sched: fix_small_imbalance: Fix local->avg_load > busiest->avg_load case Vladimir Davydov
2013-09-20 13:46   ` [tip:sched/core] sched/balancing: Fix 'local->avg_load > busiest- >avg_load' case in fix_small_imbalance() tip-bot for Vladimir Davydov
2013-09-16  5:52 ` [PATCH 1/2] sched: calculate_imbalance: Fix local->avg_load > sds->avg_load case Peter Zijlstra
2013-09-16  8:06   ` Vladimir Davydov
2013-09-16  8:11     ` Peter Zijlstra [this message]
2013-09-20 13:46 ` [tip:sched/core] sched/balancing: Fix 'local->avg_load > sds-> avg_load' case in calculate_imbalance() tip-bot for Vladimir Davydov

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=20130916081132.GP21832@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pjt@google.com \
    --cc=vdavydov@parallels.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