From: Peter Williams <pwil3058@bigpond.net.au>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Con Kolivas <kernel@kolivas.org>, Ingo Molnar <mingo@elte.hu>,
npiggin@suse.de, "Siddha, Suresh B" <suresh.b.siddha@intel.com>,
"Chen, Kenneth W" <kenneth.w.chen@intel.com>,
John Hawkes <hawkes@sgi.com>
Subject: Re: [PATCH] sched: smpnice - fix average load per run queue calculations
Date: Mon, 27 Feb 2006 17:56:12 +1100 [thread overview]
Message-ID: <4402A28C.9090008@bigpond.net.au> (raw)
In-Reply-To: <44029C9B.10507@bigpond.net.au>
[-- Attachment #1: Type: text/plain, Size: 572 bytes --]
Peter Williams wrote:
> The logical value to use for the average load per task on a run queue
> without any runnable tasks is the "default" load for a nice==0 task.
> Failure to do this may lead to anomalies in try_to_wake_up(), etc.
>
> Signed-off-by: Peter Williams <pwil3058@bigpond.com.au>
I missed a bit. Here's a fixed patch.
Signed-off-by: Peter Williams <pwil3058@bigpond.com.au>
Sorry,
Peter
--
Peter Williams pwil3058@bigpond.net.au
"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
[-- Attachment #2: fix-avg-load-per-rq --]
[-- Type: text/plain, Size: 826 bytes --]
Index: MM-2.6.X/kernel/sched.c
===================================================================
--- MM-2.6.X.orig/kernel/sched.c 2006-02-27 17:18:12.000000000 +1100
+++ MM-2.6.X/kernel/sched.c 2006-02-27 17:53:49.000000000 +1100
@@ -1058,7 +1058,7 @@ static inline unsigned long cpu_avg_load
runqueue_t *rq = cpu_rq(cpu);
unsigned long n = rq->nr_running;
- return n ? rq->raw_weighted_load / n : rq->raw_weighted_load;
+ return n ? rq->raw_weighted_load / n : SCHED_LOAD_SCALE;
}
/*
@@ -2153,6 +2153,8 @@ find_busiest_group(struct sched_domain *
min(busiest_load_per_task, max_load);
if (this_nr_running)
this_load_per_task /= this_nr_running;
+ else
+ this_load_per_task = SCHED_LOAD_SCALE;
pwr_now += this->cpu_power *
min(this_load_per_task, this_load);
pwr_now /= SCHED_LOAD_SCALE;
prev parent reply other threads:[~2006-02-27 6:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-27 6:30 Peter Williams
2006-02-27 6:56 ` Peter Williams [this message]
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=4402A28C.9090008@bigpond.net.au \
--to=pwil3058@bigpond.net.au \
--cc=akpm@osdl.org \
--cc=hawkes@sgi.com \
--cc=kenneth.w.chen@intel.com \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=npiggin@suse.de \
--cc=suresh.b.siddha@intel.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
all inboxes | Powered by JetHome®