All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Mike Galbraith <efault@gmx.de>
Subject: Re: sysbench+mysql(oltp, readonly) 30% regression with 2.6.26-rc1
Date: Thu, 08 May 2008 14:35:31 +0800	[thread overview]
Message-ID: <1210228531.3453.124.camel@ymzhang> (raw)
In-Reply-To: <1210177575.6525.4.camel@lappy.programming.kicks-ass.net>


On Wed, 2008-05-07 at 18:26 +0200, Peter Zijlstra wrote: 
> On Wed, 2008-05-07 at 12:55 +0800, Zhang, Yanmin wrote:
> > Comparing with kernel 2.6.25, sysbench+mysql(oltp, readonly) has many
> > regression with 2.6.26-rc1.
> > 
> > 1) 8-core stoakley: 28%;
> > 2) 16-core tigerton: 20%;
> > 3) Itanium Montvale: 50%.
> > 
> > Bisect located below patch.
> > 
> > 8f1bc385cfbab474db6c27b5af1e439614f3025c is first bad commit
> > commit 8f1bc385cfbab474db6c27b5af1e439614f3025c
> > Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > Date:   Sat Apr 19 19:45:00 2008 +0200
> > 
> >     sched: fair: weight calculations
> >     
> >     In order to level the hierarchy, we need to calculate load based on the
> >     root view. That is, each task's load is in the same unit.
> > 
> > 
> > 
> > After I manually reverted the patch against 2.6.26-rc1 while fixing a couple of
> > conflictions/errors, sysbench oltp regression became less than 3% on 8-core
> > stoakley.
> 
> Does this patch help?
With the patch, oltp testing result is about 50% worse than the one of pure
2.6.26-rc1.

cpu idle with 16 threads( a parameter of sysbench):
1) 2.6.25: 1%
2) 2.6.26-rc1: 33%
3) 2.6.26-rc1+new_patch: 70%.

> 
> ---
> From: Mike Galbraith <efault@gmx.de>
> Subject: sched: fix weight calculations
> 
> The conversion between virtual and real time is as follows:
> 
>   dvt = rw/w * dt <=> dt = w/rw * dvt
> 
> Since we want the fair sleeper granularity to be in real time, we actually
> need to do:
> 
>   dvt = - rw/w * l
> 
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
>  kernel/sched_fair.c |   11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> Index: linux-2.6-2/kernel/sched_fair.c
> ===================================================================
> --- linux-2.6-2.orig/kernel/sched_fair.c
> +++ linux-2.6-2/kernel/sched_fair.c
> @@ -662,10 +662,15 @@ place_entity(struct cfs_rq *cfs_rq, stru
>  	if (!initial) {
>  		/* sleeps upto a single latency don't count. */
>  		if (sched_feat(NEW_FAIR_SLEEPERS)) {
> +			unsigned long thresh = sysctl_sched_latency;
> +
> +			/*
> +			 * convert the sleeper threshold into virtual time
> +			 */
>  			if (sched_feat(NORMALIZED_SLEEPER))
> -				vruntime -= calc_delta_weight(sysctl_sched_latency, se);
> -			else
> -				vruntime -= sysctl_sched_latency;
> +				thresh = calc_delta_fair(thresh, se);
> +
> +			vruntime -= thresh;
>  		}
>  
>  		/* ensure we never gain time by being placed backwards. */
> 
> 


  reply	other threads:[~2008-05-08  6:36 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 [this message]
2008-05-08  8:00     ` Mike Galbraith
2008-05-08  8:46       ` Ingo Molnar
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=1210228531.3453.124.camel@ymzhang \
    --to=yanmin_zhang@linux.intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --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.