From: Mike Galbraith <efault@gmx.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Gregory Haskins <ghaskins@novell.com>
Subject: [revert] mysql+oltp regression
Date: Mon, 11 Aug 2008 13:32:02 +0200 [thread overview]
Message-ID: <1218454322.25098.24.camel@marge.simson.net> (raw)
Greetings,
During regression testing of tip/sched/clock fixes, a regression in low
client count throughput turned up, which I traced this back to the
commit below. I don't see anything wrong with it, but suspect that it
is preventing client/server pairs from staying together on the same CPU
as buddies, which mysql definitely likes quite a lot. (I suspect that
this is the case, because I've seen this same performance curve while
tinkering with wakeup affinity and breaking it all to pieces;)
Changelog and test results below in case nobody sees a problem with the
commit itself.
Revert commit 6d299f1b53b84e2665f402d9bcc494800aba6386
Testing of the tip/sched/clock tree revealed a mysql+oltp regression
which bisection eventually traced back to this commit in mainline.
Pertinent test results: Three run sysbench averages, throughput units
in read/write requests/sec.
clients 1 2 4 8 16 32 64
6e0534f 9646 17876 34774 33868 32230 30767 29441
2.6.26.1 9112 17936 34652 33383 31929 30665 29232
6d299f1 9112 14637 28370 33339 32038 30762 29204
Note: subsequent commits hide the majority of this regression until you
apply the clock fixes, at which time it reemerges at full magnitude.
Signed-off-by: Mike Galbraith <efault@gmx.de>
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 1fe4c65..08ae848 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1275,18 +1275,23 @@ __load_balance_iterator(struct cfs_rq *cfs_rq, struct list_head *next)
struct task_struct *p = NULL;
struct sched_entity *se;
- while (next != &cfs_rq->tasks) {
+ if (next == &cfs_rq->tasks)
+ return NULL;
+
+ /* Skip over entities that are not tasks */
+ do {
se = list_entry(next, struct sched_entity, group_node);
next = next->next;
+ } while (next != &cfs_rq->tasks && !entity_is_task(se));
- /* Skip over entities that are not tasks */
- if (entity_is_task(se)) {
- p = task_of(se);
- break;
- }
- }
+ if (next == &cfs_rq->tasks)
+ return NULL;
cfs_rq->balance_iterator = next;
+
+ if (entity_is_task(se))
+ p = task_of(se);
+
return p;
}
next reply other threads:[~2008-08-11 11:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-11 11:32 Mike Galbraith [this message]
2008-08-11 11:43 ` [revert] mysql+oltp regression Ingo Molnar
2008-08-11 12:27 ` Gregory Haskins
2008-08-11 12:48 ` Ingo Molnar
2008-08-11 12:51 ` Ingo Molnar
2008-08-11 13:03 ` Gregory Haskins
2008-08-11 13:14 ` Ingo Molnar
2008-08-11 13:19 ` Gregory Haskins
2008-08-11 13:27 ` Gregory Haskins
2008-08-11 13:31 ` Ingo Molnar
2008-08-11 13:29 ` Ingo Molnar
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=1218454322.25098.24.camel@marge.simson.net \
--to=efault@gmx.de \
--cc=a.p.zijlstra@chello.nl \
--cc=ghaskins@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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.