From: Con Kolivas <kernel@kolivas.org>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>
Subject: [PATCH] sched: consider migration thread with smp nice
Date: Sat, 2 Jul 2005 10:22:29 +1000 [thread overview]
Message-ID: <200507021022.31933.kernel@kolivas.org> (raw)
In-Reply-To: <20050701044018.281b1ebd.akpm@osdl.org>
[-- Attachment #1.1: Type: text/plain, Size: 278 bytes --]
On Fri, 1 Jul 2005 21:40, Andrew Morton wrote:
> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.13-rc1/2.
>6.13-rc1-mm1/
Hi akpm
With your 4 bazillion patches I guess this got missed. It's an add-on
to the smp-nice series.
Cheers,
Con
---
[-- Attachment #1.2: sched-consider_migration_thread_smp_nice.patch --]
[-- Type: text/x-diff, Size: 1999 bytes --]
The intermittent scheduling of the migration thread at ultra high priority
makes the smp nice handling see that runqueue as being heavily loaded. The
migration thread itself actually handles the balancing so its influence on
priority balancing should be ignored.
Signed-off-by: Con Kolivas <kernel@kolivas.org>
Index: linux-2.6.12-mm1/kernel/sched.c
===================================================================
--- linux-2.6.12-mm1.orig/kernel/sched.c 2005-06-26 17:59:10.000000000 +1000
+++ linux-2.6.12-mm1/kernel/sched.c 2005-06-26 18:02:01.000000000 +1000
@@ -669,6 +669,31 @@ static inline void dec_prio_bias(runqueu
{
rq->prio_bias -= MAX_PRIO - prio;
}
+
+static inline void inc_nr_running(task_t *p, runqueue_t *rq)
+{
+ rq->nr_running++;
+ if (rt_task(p)) {
+ if (p != rq->migration_thread)
+ /*
+ * The migration thread does the actual balancing. Do
+ * not bias by its priority as the ultra high priority
+ * will skew balancing adversely.
+ */
+ inc_prio_bias(rq, p->prio);
+ } else
+ inc_prio_bias(rq, p->static_prio);
+}
+
+static inline void dec_nr_running(task_t *p, runqueue_t *rq)
+{
+ rq->nr_running--;
+ if (rt_task(p)) {
+ if (p != rq->migration_thread)
+ dec_prio_bias(rq, p->prio);
+ } else
+ dec_prio_bias(rq, p->static_prio);
+}
#else
static inline void inc_prio_bias(runqueue_t *rq, int prio)
{
@@ -677,25 +702,17 @@ static inline void inc_prio_bias(runqueu
static inline void dec_prio_bias(runqueue_t *rq, int prio)
{
}
-#endif
static inline void inc_nr_running(task_t *p, runqueue_t *rq)
{
rq->nr_running++;
- if (rt_task(p))
- inc_prio_bias(rq, p->prio);
- else
- inc_prio_bias(rq, p->static_prio);
}
static inline void dec_nr_running(task_t *p, runqueue_t *rq)
{
rq->nr_running--;
- if (rt_task(p))
- dec_prio_bias(rq, p->prio);
- else
- dec_prio_bias(rq, p->static_prio);
}
+#endif
/*
* __activate_task - move a task to the runqueue.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-07-02 0:22 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-01 11:40 2.6.13-rc1-mm1 Andrew Morton
2005-07-01 12:33 ` 2.6.13-rc1-mm1 Daniel Andersen
2005-07-01 22:05 ` 2.6.13-rc1-mm1 Rafael J. Wysocki
2005-07-04 20:27 ` 2.6.13-rc1-mm1 Alexey Dobriyan
2005-07-02 0:22 ` Con Kolivas [this message]
2005-07-02 2:43 ` 2.6.13-rc1-mm1 Dominik Karall
2005-07-02 2:55 ` 2.6.13-rc1-mm1 randy_dunlap
2005-07-02 3:19 ` Firewire/SBP2 and the -mm tree (was: Re: 2.6.13-rc1-mm1) Rogério Brito
2005-07-02 4:34 ` Rogério Brito
2005-07-02 9:56 ` Firewire/SBP2 and the -mm tree Stefan Richter
2005-07-03 5:33 ` Rogério Brito
2005-07-03 18:04 ` Rogério Brito
2005-07-03 20:03 ` Stefan Richter
2005-07-04 20:05 ` Rogério Brito
2005-07-02 13:39 ` Firewire/SBP2 and the -mm tree (was: Re: 2.6.13-rc1-mm1) Ben Collins
2005-07-02 5:39 ` 2.6.13-rc1-mm1 Grant Coady
2005-07-02 9:16 ` 2.6.13-rc1-mm1: git-mtd.patch breaks i386 compile Adrian Bunk
2005-07-02 9:37 ` Thomas Gleixner
2005-07-04 23:04 ` Thomas Gleixner
2005-07-04 12:36 ` 2.6.13-rc1-mm1 Joseph Fannin
-- strict thread matches above, loose matches on Subject: below --
2005-06-26 8:25 [PATCH] sched: consider migration thread with smp nice Con Kolivas
2005-06-28 0:43 ` Peter Williams
2005-06-28 0:48 ` Con Kolivas
2005-06-28 2:30 ` 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=200507021022.31933.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=akpm@osdl.org \
--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