From: Ingo Molnar <mingo@elte.hu>
To: Mike Galbraith <efault@gmx.de>
Cc: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: sysbench+mysql(oltp, readonly) 30% regression with 2.6.26-rc1
Date: Thu, 8 May 2008 11:25:47 +0200 [thread overview]
Message-ID: <20080508092547.GA32574@elte.hu> (raw)
In-Reply-To: <20080508084607.GA31515@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> - down(&kernel_sem);
> + if (panic_timeout) {
> + while (down_trylock(&kernel_sem))
> + cpu_relax();
updated one below - this will work fine in the !panic_timeout case too
;-)
Ingo
Index: linux/lib/kernel_lock.c
===================================================================
--- linux.orig/lib/kernel_lock.c
+++ linux/lib/kernel_lock.c
@@ -46,7 +46,12 @@ int __lockfunc __reacquire_kernel_lock(v
task->lock_depth = -1;
preempt_enable_no_resched();
- down(&kernel_sem);
+ if (panic_timeout) {
+ while (down_trylock(&kernel_sem))
+ cpu_relax();
+ } else {
+ down(&kernel_sem);
+ }
preempt_disable();
task->lock_depth = saved_lock_depth;
@@ -67,11 +72,17 @@ void __lockfunc lock_kernel(void)
struct task_struct *task = current;
int depth = task->lock_depth + 1;
- if (likely(!depth))
+ if (likely(!depth)) {
/*
* No recursion worries - we set up lock_depth _after_
*/
- down(&kernel_sem);
+ if (panic_timeout) {
+ while (down_trylock(&kernel_sem))
+ cpu_relax();
+ } else {
+ down(&kernel_sem);
+ }
+ }
task->lock_depth = depth;
}
next prev parent reply other threads:[~2008-05-08 9:26 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-07 4:55 sysbench+mysql(oltp, readonly) 30% regression with 2.6.26-rc1 Zhang, Yanmin
2008-05-07 9:16 ` Ingo Molnar
2008-05-07 9:33 ` Zhang, Yanmin
2008-05-07 10:40 ` Ingo Molnar
2008-05-07 16:26 ` Peter Zijlstra
2008-05-08 6:35 ` Zhang, Yanmin
2008-05-08 8:00 ` Mike Galbraith
2008-05-08 8:46 ` Ingo Molnar
2008-05-08 9:25 ` Ingo Molnar [this message]
2008-05-08 10:00 ` Mike Galbraith
2008-05-08 9:37 ` Mike Galbraith
2008-05-08 9:01 ` Zhang, Yanmin
2008-05-08 9:13 ` Peter Zijlstra
2008-05-08 9:15 ` Mike Galbraith
2008-05-08 9:22 ` Zhang, Yanmin
2008-05-08 9:23 ` Peter Zijlstra
2008-05-09 1:16 ` Zhang, Yanmin
2008-05-09 6:51 ` Peter Zijlstra
2008-05-09 7:32 ` Mike Galbraith
2008-05-09 7:50 ` Peter Zijlstra
2008-05-09 7:58 ` Mike Galbraith
2008-05-09 8:02 ` Peter Zijlstra
2008-05-09 8:23 ` Mike Galbraith
2008-05-09 9:47 ` Mike Galbraith
2008-05-09 7:59 ` Mike Galbraith
2008-05-09 8:10 ` Peter Zijlstra
2008-05-09 8:25 ` Mike Galbraith
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=20080508092547.GA32574@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=yanmin_zhang@linux.intel.com \
/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