From: Peter Williams <pwil3058@bigpond.net.au>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Siddha, Suresh B" <suresh.b.siddha@intel.com>,
npiggin@suse.de, Ingo Molnar <mingo@elte.hu>,
Steven Rostedt <rostedt@goodmis.org>,
Linus Torvalds <torvalds@osdl.org>,
Con Kolivas <kernel@kolivas.org>
Subject: [PATCH] Fix smpnice high priority task hopping problem
Date: Thu, 16 Feb 2006 11:39:34 +1100 [thread overview]
Message-ID: <43F3C9C6.5080606@bigpond.net.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]
Suresh B. Siddha has reported:
"on a lightly loaded system, this will result in higher priority job
hopping around from one processor to another processor.. This is because
of the code in find_busiest_group() which assumes that SCHED_LOAD_SCALE
represents a unit process load and with nice_to_bias calculations this
is no longer true (in the presence of non nice-0 tasks)"
Analysis of this problem as revealed that the smpnice code results in
the weighted load being larger than 1 and this triggers the active load
balancing code. However, in active_load_balance(), the migration thread
fails to take into account itself when deciding if there are any tasks
to be migrated from its run queue. I.e. even if there is only one other
task on the run queue other than itself it will still migrate that other
task.
The attached patch fixes that anomaly.
Signed-off-by: Peter Williams <pwil3058@bigpond.com.au>
Peter
--
Peter Williams pwil3058@bigpond.net.au
"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
[-- Attachment #2: fix-smpnice-task-hopping-problem --]
[-- Type: text/plain, Size: 471 bytes --]
Index: MM-2.6.X/kernel/sched.c
===================================================================
--- MM-2.6.X.orig/kernel/sched.c 2006-02-16 10:51:52.000000000 +1100
+++ MM-2.6.X/kernel/sched.c 2006-02-16 11:02:45.000000000 +1100
@@ -2406,7 +2406,7 @@ static void active_load_balance(runqueue
runqueue_t *target_rq;
int target_cpu = busiest_rq->push_cpu;
- if (busiest_rq->nr_running <= 1)
+ if (busiest_rq->nr_running <= 2)
/* no task to move */
return;
next reply other threads:[~2006-02-16 0:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-16 0:39 Peter Williams [this message]
2006-02-17 1:13 ` [PATCH] Fix smpnice high priority task hopping problem Siddha, Suresh B
2006-02-17 2:30 ` Peter Williams
2006-02-17 2:51 ` Peter Williams
2006-02-17 2:58 ` Siddha, Suresh B
2006-02-17 3:16 ` Peter Williams
2006-02-17 2:54 ` Siddha, Suresh B
2006-02-17 3:14 ` Peter Williams
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=43F3C9C6.5080606@bigpond.net.au \
--to=pwil3058@bigpond.net.au \
--cc=akpm@osdl.org \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=npiggin@suse.de \
--cc=rostedt@goodmis.org \
--cc=suresh.b.siddha@intel.com \
--cc=torvalds@osdl.org \
/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