mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Lin Ming <ming.m.lin@intel.com>
Cc: peterz@infradead.org, mingo@elte.hu, 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: Sun, 27 Dec 2009 09:32:40 +0100	[thread overview]
Message-ID: <1261902760.6201.33.camel@marge.simson.net> (raw)
In-Reply-To: <1261739467.10685.18.camel@minggr.sh.intel.com>

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, but I see regression I haven't been able to identify as well.

Tbench state of the union according to my box below.

With a max performance config, 32.2 is down ~4% vs 31.9, most of which
is doing affinity checks on every wakeup.  That has it's benefits too,
but definitely ain't free, or even particularly cheap for fast movers.
Would be nice to find a way to keep the ramp-up improvements without
this much cost.

Perf also isn't free, and in 33, we lost the ability to config it out,
but even doing so via axe, there's an unidentified regression.

As usual, bisection of tbench variance was a wasted effort.

2.6.31.9  = -CONFIG_PERF_COUNTERS
2.6.31.9p = +CONFIG_PERF_COUNTERS
2.6.32.2  = -CONFIG_PERF_EVENTS
2.6.32.2p = +CONFIG_PERF_EVENTS
git = v2.6.33-rc2
tip = v2.6.33-rc1-306-gae7a88c

tbench 8
2.6.31.9             1190 MB/sec
2.6.31.9p            1172 MB/sec  .984
2.6.32.2             1146 MB/sec  .977 vs 31.9 .963
2.6.32.2p            1129 MB/sec  .985 vs 31.9 .948
2.6.33.git           1117 MB/sec  .989 vs 31.9 .938
2.6.33.tip           1121 MB/sec 1.003 vs 31.9 .942

2.6.32.2             1146 MB/sec 1.000
2.6.32.2x            1181 MB/sec 1.030 vs 31.9 .992

2.6.33.git           1117 MB/sec 1.000
2.6.33.gitx          1145 MB/sec 1.025 vs 32.2x .969 vs 31.9 .962  (perf/hwbp off via axe)

2.6.32.2x diff
diff --git a/kernel/sched.c b/kernel/sched.c
index d079a9f..b71cb91 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2363,6 +2363,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
 	orig_cpu = cpu;
 
 #ifdef CONFIG_SMP
+	if (cpu == this_cpu)
+		goto out_stats;
+
 	if (unlikely(task_running(rq, p)))
 		goto out_activate;
 
@@ -2389,6 +2392,7 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state,
 	WARN_ON(p->state != TASK_WAKING);
 	cpu = task_cpu(p);
 
+out_stats:
 #ifdef CONFIG_SCHEDSTATS
 	schedstat_inc(rq, ttwu_count);
 	if (cpu == this_cpu)



  reply	other threads:[~2009-12-27  8:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-25 11:11 Lin Ming
2009-12-27  8:32 ` Mike Galbraith [this message]
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
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=1261902760.6201.33.camel@marge.simson.net \
    --to=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --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

Powered by JetHome