All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <piggin@cyberone.com.au>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: Con Kolivas <kernel@kolivas.org>,
	Davide Libenzi <davidel@xmailserver.org>,
	Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] Fix find busiest queue 2.6.0-test9
Date: Mon, 10 Nov 2003 11:59:12 +1100	[thread overview]
Message-ID: <3FAEE2E0.2040306@cyberone.com.au> (raw)
In-Reply-To: <125870000.1068397851@[10.10.2.4]>



Martin J. Bligh wrote:

>On the same vein ... this looks odd:
>
>         * We fend off statistical fluctuations in runqueue lengths by
>         * saving the runqueue length during the previous load-balancing
>         * operation and using the smaller one the current and saved lengths.
>         * If a runqueue is long enough for a longer amount of time then
>         * we recognize it and pull tasks from it.
>...
>        if (idle || (this_rq->nr_running > this_rq->prev_cpu_load[this_cpu]))
>                nr_running = this_rq->nr_running;
>        else
>                nr_running = this_rq->prev_cpu_load[this_cpu];
>
>It says we uses the smaller of the two in the comment, but then it seems to
>use the > of the two in the code? Unless I'm losing it, which is likely ;-)
>

You want the larger of the two values to be taken for the destination
queue, and the smaller to be taken for the source queue. This way you
get a minimal imbalance.



  reply	other threads:[~2003-11-10  1:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-08 16:49 [PATCH] Fix find busiest queue 2.6.0-test9 Con Kolivas
2003-11-08 22:41 ` Nick Piggin
2003-11-08 22:58 ` Andrew Morton
2003-11-08 23:42   ` Nick Piggin
2003-11-09  0:44     ` Davide Libenzi
2003-11-09 15:34       ` Martin J. Bligh
2003-11-09 15:53         ` Davide Libenzi
2003-11-09 15:58           ` Martin J. Bligh
2003-11-09 16:05             ` Davide Libenzi
2003-11-09 16:07               ` Con Kolivas
2003-11-09 17:10                 ` Martin J. Bligh
2003-11-10  0:59                   ` Nick Piggin [this message]
2003-11-10  7:46               ` Ingo Molnar
2003-11-09 15:59           ` Con Kolivas
2003-11-09 16:48             ` Martin J. Bligh
2003-11-09 17:27               ` Davide Libenzi
2003-11-09 20:39                 ` Martin J. Bligh

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=3FAEE2E0.2040306@cyberone.com.au \
    --to=piggin@cyberone.com.au \
    --cc=akpm@osdl.org \
    --cc=davidel@xmailserver.org \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=mingo@elte.hu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.