From: Ingo Molnar <mingo@elte.hu>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: 'Nick Piggin' <nickpiggin@yahoo.com.au>,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
Andrew Morton <akpm@osdl.org>
Subject: [sched, patch] better wake-balancing, #2
Date: Fri, 29 Jul 2005 15:02:07 +0000 [thread overview]
Message-ID: <20050729150207.GA6332@elte.hu> (raw)
In-Reply-To: <20050729141311.GA4154@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> another approach would be the patch below, to do wakeup-balancing only
> if the wakeup CPU or the task CPU is idle.
there's an even simpler way: only do wakeup-balancing if this_cpu is
idle. (tbench results are still OK, and other workloads improved.)
Ingo
--------
do wakeup-balancing only if the wakeup-CPU is idle.
this prevents excessive wakeup-balancing while the system is highly
loaded, but helps spread out the workload on partly idle systems.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c | 6 ++++++
1 files changed, 6 insertions(+)
Index: linux-sched-curr/kernel/sched.c
=================================--- linux-sched-curr.orig/kernel/sched.c
+++ linux-sched-curr/kernel/sched.c
@@ -1253,7 +1253,13 @@ static int try_to_wake_up(task_t *p, uns
if (unlikely(task_running(rq, p)))
goto out_activate;
+ /*
+ * Only do wakeup-balancing (= potentially migrate the task)
+ * if this CPU is idle:
+ */
new_cpu = cpu;
+ if (!idle_cpu(this_cpu))
+ goto out_set_cpu;
schedstat_inc(rq, ttwu_cnt);
if (cpu = this_cpu) {
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Cc: "'Nick Piggin'" <nickpiggin@yahoo.com.au>,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
Andrew Morton <akpm@osdl.org>
Subject: [sched, patch] better wake-balancing, #2
Date: Fri, 29 Jul 2005 17:02:07 +0200 [thread overview]
Message-ID: <20050729150207.GA6332@elte.hu> (raw)
In-Reply-To: <20050729141311.GA4154@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> another approach would be the patch below, to do wakeup-balancing only
> if the wakeup CPU or the task CPU is idle.
there's an even simpler way: only do wakeup-balancing if this_cpu is
idle. (tbench results are still OK, and other workloads improved.)
Ingo
--------
do wakeup-balancing only if the wakeup-CPU is idle.
this prevents excessive wakeup-balancing while the system is highly
loaded, but helps spread out the workload on partly idle systems.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c | 6 ++++++
1 files changed, 6 insertions(+)
Index: linux-sched-curr/kernel/sched.c
===================================================================
--- linux-sched-curr.orig/kernel/sched.c
+++ linux-sched-curr/kernel/sched.c
@@ -1253,7 +1253,13 @@ static int try_to_wake_up(task_t *p, uns
if (unlikely(task_running(rq, p)))
goto out_activate;
+ /*
+ * Only do wakeup-balancing (== potentially migrate the task)
+ * if this CPU is idle:
+ */
new_cpu = cpu;
+ if (!idle_cpu(this_cpu))
+ goto out_set_cpu;
schedstat_inc(rq, ttwu_cnt);
if (cpu == this_cpu) {
next prev parent reply other threads:[~2005-07-29 15:02 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-28 23:08 Delete scheduler SD_WAKE_AFFINE and SD_WAKE_BALANCE flags Chen, Kenneth W
2005-07-28 23:08 ` Chen, Kenneth W
2005-07-28 23:34 ` Nick Piggin
2005-07-28 23:34 ` Nick Piggin
2005-07-28 23:48 ` Chen, Kenneth W
2005-07-28 23:48 ` Chen, Kenneth W
2005-07-29 1:25 ` Nick Piggin
2005-07-29 1:25 ` Nick Piggin
2005-07-29 1:39 ` Chen, Kenneth W
2005-07-29 1:39 ` Chen, Kenneth W
2005-07-29 1:46 ` Nick Piggin
2005-07-29 1:46 ` Nick Piggin
2005-07-29 1:53 ` Chen, Kenneth W
2005-07-29 1:53 ` Chen, Kenneth W
2005-07-29 2:01 ` Nick Piggin
2005-07-29 2:01 ` Nick Piggin
2005-07-29 6:27 ` Chen, Kenneth W
2005-07-29 6:27 ` Chen, Kenneth W
2005-07-29 8:48 ` Nick Piggin
2005-07-29 8:48 ` Nick Piggin
2005-07-29 8:53 ` Ingo Molnar
2005-07-29 8:53 ` Ingo Molnar
2005-07-29 8:59 ` Nick Piggin
2005-07-29 8:59 ` Nick Piggin
2005-07-29 9:01 ` Ingo Molnar
2005-07-29 9:01 ` Ingo Molnar
2005-07-29 9:07 ` Ingo Molnar
2005-07-29 9:07 ` Ingo Molnar
2005-07-29 16:40 ` Ingo Molnar
2005-07-29 16:40 ` Ingo Molnar
2005-07-29 11:48 ` [patch] remove wake-balancing Ingo Molnar
2005-07-29 11:48 ` Ingo Molnar
2005-07-29 14:13 ` [sched, patch] better wake-balancing Ingo Molnar
2005-07-29 14:13 ` Ingo Molnar
2005-07-29 15:02 ` Ingo Molnar [this message]
2005-07-29 15:02 ` [sched, patch] better wake-balancing, #2 Ingo Molnar
2005-07-29 16:21 ` [sched, patch] better wake-balancing, #3 Ingo Molnar
2005-07-29 16:21 ` Ingo Molnar
2005-07-30 0:08 ` Nick Piggin
2005-07-30 0:08 ` Nick Piggin
2005-07-30 7:19 ` Ingo Molnar
2005-07-30 7:19 ` Ingo Molnar
2005-07-31 1:15 ` Nick Piggin
2005-07-31 1:15 ` Nick Piggin
2005-08-01 17:13 ` Siddha, Suresh B
2005-08-01 17:13 ` Siddha, Suresh B
2005-08-08 23:18 ` Chen, Kenneth W
2005-08-08 23:18 ` Chen, Kenneth W
2005-07-30 23:26 ` [sched, patch] better wake-balancing, #2 Chuck Ebbert
2005-07-30 23:26 ` Chuck Ebbert
2005-07-31 4:35 ` Con Kolivas
2005-07-31 4:35 ` Con Kolivas
2005-07-31 6:29 ` Ingo Molnar
2005-07-31 6:29 ` Ingo Molnar
2005-07-31 13:35 ` Chuck Ebbert
2005-07-31 13:35 ` Chuck Ebbert
2005-07-29 11:26 ` Delete scheduler SD_WAKE_AFFINE and SD_WAKE_BALANCE flags Ingo Molnar
2005-07-29 11:26 ` Ingo Molnar
2005-07-29 17:30 ` Chen, Kenneth W
2005-07-29 17:30 ` Chen, Kenneth W
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=20050729150207.GA6332@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=kenneth.w.chen@intel.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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.