From: Nick Piggin <piggin@cyberone.com.au>
To: Con Kolivas <conman@kolivas.net>, Andrew Morton <akpm@osdl.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: sched domains kernbench improvements
Date: Sat, 28 Feb 2004 20:21:02 +1100 [thread overview]
Message-ID: <40405D7E.7000404@cyberone.com.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]
Con,
I was able to reproduce your half-load kernbench problems
on the non-NUMA stp 8-way.
I made a pretty simple "lessidle" patch which tweaks some
sched domain parameters to be more inclined to move tasks,
especially when idle. That brought performance to nearly
exactly the same as 2.6.3.
Context switches are still up, but user and system time
is down a bit. So indicates it is still less balance-happy
but is obviously enough to bring the idle time down.
2.6.3: http://khack.osdl.org/stp/288459/
2.6.3-mm4-lessidle: http://khack.osdl.org/stp/288995/
Phew! So it is more a matter of tuning than anything
fundamental. It may be that the patch now makes balancing
too aggressive, but it is probably better to err on the
side that is closer to 2.6 behaviour.
I haven't tested this on much else.
[-- Attachment #2: sched-lessidle.patch --]
[-- Type: text/plain, Size: 1818 bytes --]
linux-2.6-npiggin/include/linux/sched.h | 16 ++++++++--------
linux-2.6-npiggin/kernel/sched.c | 5 +++++
2 files changed, 13 insertions(+), 8 deletions(-)
diff -puN include/linux/sched.h~sched-lessidle include/linux/sched.h
--- linux-2.6/include/linux/sched.h~sched-lessidle 2004-02-21 10:57:07.000000000 +1100
+++ linux-2.6-npiggin/include/linux/sched.h 2004-02-21 10:59:46.000000000 +1100
@@ -598,11 +598,11 @@ struct sched_domain {
.parent = NULL, \
.groups = NULL, \
.min_interval = 1, \
- .max_interval = 8, \
- .busy_factor = 32, \
+ .max_interval = 4, \
+ .busy_factor = 64, \
.imbalance_pct = 125, \
- .cache_hot_time = (5*1000000), \
- .cache_nice_tries = 2, \
+ .cache_hot_time = (5*1000000/2), \
+ .cache_nice_tries = 1, \
.flags = SD_FLAG_FASTMIGRATE | SD_FLAG_NEWIDLE,\
.last_balance = jiffies, \
.balance_interval = 1, \
@@ -615,11 +615,11 @@ struct sched_domain {
.span = CPU_MASK_NONE, \
.parent = NULL, \
.groups = NULL, \
- .min_interval = 20, \
- .max_interval = 1000*fls(num_online_cpus()),\
- .busy_factor = 4, \
+ .min_interval = 8, \
+ .max_interval = 256*fls(num_online_cpus()),\
+ .busy_factor = 8, \
.imbalance_pct = 125, \
- .cache_hot_time = (5*1000000), \
+ .cache_hot_time = (10*1000000), \
.cache_nice_tries = 1, \
.flags = SD_FLAG_EXEC, \
.last_balance = jiffies, \
diff -puN kernel/sched.c~sched-lessidle kernel/sched.c
--- linux-2.6/kernel/sched.c~sched-lessidle 2004-02-21 10:57:10.000000000 +1100
+++ linux-2.6-npiggin/kernel/sched.c 2004-02-21 16:15:18.000000000 +1100
@@ -1493,6 +1493,11 @@ nextgroup:
return busiest;
out_balanced:
+ if (busiest && idle == NEWLY_IDLE) {
+ *imbalance = 1;
+ return busiest;
+ }
+
*imbalance = 0;
return NULL;
}
_
next reply other threads:[~2004-02-28 9:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-28 9:21 Nick Piggin [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-28 10:59 sched domains kernbench improvements Con Kolivas
2004-02-28 11:15 ` Nick Piggin
2004-02-28 11:18 ` Con Kolivas
2004-02-28 11:23 ` Nick Piggin
2004-02-28 12:27 ` Con Kolivas
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=40405D7E.7000404@cyberone.com.au \
--to=piggin@cyberone.com.au \
--cc=akpm@osdl.org \
--cc=conman@kolivas.net \
--cc=linux-kernel@vger.kernel.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