public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lin Ming <ming.m.lin@intel.com>
To: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
	"mingo@elte.hu" <mingo@elte.hu>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
Subject: Re: tbench regression with 2.6.33-rc1
Date: Tue, 12 Jan 2010 09:09:06 +0800	[thread overview]
Message-ID: <1263258546.3598.19.camel@minggr.sh.intel.com> (raw)
In-Reply-To: <1263226612.6290.9.camel@marge.simson.net>

On Tue, 2010-01-12 at 00:16 +0800, Mike Galbraith wrote:
> On Mon, 2010-01-11 at 13:08 +0100, Peter Zijlstra wrote:
> > On Fri, 2009-12-25 at 19:11 +0800, Lin Ming wrote:
> > > Hi,
> > > 
> > > Test machine: 16 cpus (4P/2Core/HT), 8G mem
> > > tbench test command:
> > > tbench_srv &
> > > tbench 32
> > > 
> > > Compared with 2.6.32, tbench has ~4% regression in 2.6.33-rc1.
> > > 
> > > >From vmstat data, the context switch number also drop ~4%.
> > > perf top data does not show much differences.
> > > 
> > > But lockstat data shows huge difference in rq->lock, as below.
> > > See the attachment for the full lockstat data.
> > > 
> > > Any clue of this regression?
> > 
> > Nope, I thought to see the same on a dual-socket machine, but when
> > bisecting I ended up on a user-space perf commit, which is pretty much
> > impossible.
> > 
> > I did notice some variance in the numbers between boots, maybe it was
> > large enough to fool me.. (~2800 MB/s was the good one, ~2200 MB/s was
> > the bad one).
> > 
> > perf itself also didn't really provide clue, perf record -ag on the
> > workload didn't really show anything scheduler related. vmstat 1 did
> > show a proportional drop in context switch rate between the kernels
> > though.. most odd.
> 
> I've been all through it too, same result.  The below may make a bit of
> difference, but really has diddly spit to do with this oddity.

I test this patch applied to 2.6.33-rc3, but no help on tbench
regression.

Lin Ming

> 
> netperf TCP_RR
> tip          93445 RR/sec
> tip+         99454 RR/sec
>              1.064
> 
> tbench 8
> tip          1144 MB/sec
> tip+         1166 MB/sec
>              1.019
> 
> sched: don't call wake_affine() when the result doesn't matter.
> 
> Signed-off-by: Mike Galbraith <efault@gmx.de>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> LKML-Reference: <new-submission>
> 
>  kernel/sched_fair.c |   12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6/kernel/sched_fair.c
> ===================================================================
> --- linux-2.6.orig/kernel/sched_fair.c
> +++ linux-2.6/kernel/sched_fair.c
> @@ -1530,6 +1530,7 @@ static int select_task_rq_fair(struct ta
>  			sd = tmp;
>  	}
>  
> +#ifdef CONFIG_GROUP_SCHED
>  	if (sched_feat(LB_SHARES_UPDATE)) {
>  		/*
>  		 * Pick the largest domain to update shares over
> @@ -1543,9 +1544,16 @@ static int select_task_rq_fair(struct ta
>  		if (tmp)
>  			update_shares(tmp);
>  	}
> +#endif
>  
> -	if (affine_sd && wake_affine(affine_sd, p, sync))
> -		return cpu;
> +	if (affine_sd) {
> +		if (cpu == prev_cpu)
> +			return cpu;
> +		if (wake_affine(affine_sd, p, sync))
> +			return cpu;
> +		if (!(affine_sd->flags & SD_BALANCE_WAKE))
> +			return prev_cpu;
> +	}
>  
>  	while (sd) {
>  		int load_idx = sd->forkexec_idx;
> 
> 


  reply	other threads:[~2010-01-12  1:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-25 11:11 tbench regression with 2.6.33-rc1 Lin Ming
2009-12-27  8:32 ` Mike Galbraith
2009-12-27  8:59   ` Peter Zijlstra
2009-12-27  9:41     ` Mike Galbraith
2009-12-27 10:11       ` Peter Zijlstra
2010-01-02  3:56         ` Frederic Weisbecker
2009-12-29  2:09   ` Lin Ming
2009-12-29  5:24     ` Mike Galbraith
2009-12-29  5:19       ` Lin Ming
2009-12-29  5:49         ` Mike Galbraith
2010-01-06  6:01           ` Mike Galbraith
2010-01-06  5:55             ` Lin Ming
2010-01-06  6:52               ` Lin Ming
2010-01-06  7:44                 ` Mike Galbraith
2010-01-11 12:08 ` Peter Zijlstra
2010-01-11 16:16   ` Mike Galbraith
2010-01-12  1:09     ` Lin Ming [this message]
2010-01-12  2:33       ` Mike Galbraith
2010-01-12  3:13         ` Lin Ming
2010-01-12  4:14           ` Mike Galbraith
2010-01-12  8:54       ` Peter Zijlstra
2010-01-12  9:20         ` Lin Ming

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=1263258546.3598.19.camel@minggr.sh.intel.com \
    --to=ming.m.lin@intel.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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