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 10:46:07 +0200 [thread overview]
Message-ID: <20080508084607.GA31515@elte.hu> (raw)
In-Reply-To: <1210233617.4895.6.camel@marge.simson.net>
* Mike Galbraith <efault@gmx.de> wrote:
> > With the patch, oltp testing result is about 50% worse than the one
> > of pure 2.6.26-rc1.
>
> Hm. I was doing some sysbench+postgress(oltp, ro) testing on my
> little Q6600 box this morning, and saw a different picture.
>
> In attached pdf, .bkl refers to Linus' BKL patch, .weight is the
> weight fix, both are applied to git.today. The script I used is also
> attached.
nice numbers. I'm curious about the following detail related to Linus's
BKL-spinlock patch: am i correct that it shows a small but systematic
improvement with many clients? sysbench has not shown sensitivity to any
BKL detail before.
Could you perhaps try the hack below that uses /proc/sys/kernel/panic as
a flag whether the BKL should cause us to block or should be spun upon.
Can you confirm that with that patch too sysbench shows sensitivity to
the value of the panic flag? [this is the surest way to measure such
effects as flipping the sysctl only minimally impacts the system.]
if sysbench truly is dependent on the BKL then that's another argument
in favor of Linus's patch.
Ingo
-------------------------->
Subject: BKL: spin on acquire
From: Ingo Molnar <mingo@elte.hu>
Date: Wed May 07 19:05:40 CEST 2008
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
lib/kernel_lock.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
Index: linux/lib/kernel_lock.c
===================================================================
--- linux.orig/lib/kernel_lock.c
+++ linux/lib/kernel_lock.c
@@ -46,7 +46,10 @@ 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();
+ }
preempt_disable();
task->lock_depth = saved_lock_depth;
@@ -67,11 +70,15 @@ 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();
+ }
+ }
task->lock_depth = depth;
}
next prev parent reply other threads:[~2008-05-08 8:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-07 4:55 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 [this message]
2008-05-08 9:25 ` Ingo Molnar
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=20080508084607.GA31515@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
all inboxes | Powered by JetHome®