mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Serge Belyshev <belyshev@depni.sinp.msu.ru>
To: Ingo Molnar <mingo@elte.hu>
Cc: Con Kolivas <kernel@kolivas.org>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Mike Galbraith <efault@gmx.de>
Subject: Re: Epic regression in throughput since v2.6.23
Date: Sun, 13 Sep 2009 15:27:28 +0000	[thread overview]
Message-ID: <87iqfmx3tr.fsf@depni.sinp.msu.ru> (raw)
In-Reply-To: <20090911061024.GA27833@elte.hu> (Ingo Molnar's message of "Fri, 11 Sep 2009 08:10:24 +0200")

[-- Attachment #1: Type: text/plain, Size: 5259 bytes --]

Ingo Molnar <mingo@elte.hu> writes:

> Could still compare -j5 to -j4 on -tip, to see why -j4 is 3% short 
> of -j5's throughput.
>
> (Plus maybe the NEW_FAIR_SLEEPERS change in -tip fixes the 3% drop.)

I've hacked the "perf" tool a bit (see the attached patch) and obtained
the following results with "perf stat -r9 make -j4 -- make clean":

--------------------------------------------------------------------------------
2.6.31-tip-01381-gf4c92b6:

 Performance counter stats for 'make -j4' (9 runs):

   94730.871493  task-clock-msecs         #      3.503 CPUs    ( +-   0.022% )
          17499  context-switches         #      0.000 M/sec   ( +-   0.270% )
           1127  CPU-migrations           #      0.000 M/sec   ( +-   1.159% )
        4601950  page-faults              #      0.049 M/sec   ( +-   0.001% )
   237853044260  cycles                   #   2510.829 M/sec   ( +-   0.022% )
   200554338937  instructions             #      0.843 IPC     ( +-   0.000% )
    70615226021  cache-references         #    745.430 M/sec   ( +-   0.002% )
     2268068445  cache-misses             #     23.942 M/sec   ( +-   0.020% )

   27.046390652  seconds time elapsed   ( +-   0.085% )


 Performance counter stats for 'make -j5' (9 runs):

   95283.766024  task-clock-msecs         #      3.541 CPUs    ( +-   0.024% )
          20612  context-switches         #      0.000 M/sec   ( +-   0.297% )
           1644  CPU-migrations           #      0.000 M/sec   ( +-   0.711% )
        4601733  page-faults              #      0.048 M/sec   ( +-   0.001% )
   239234709890  cycles                   #   2510.760 M/sec   ( +-   0.024% )
   200562340756  instructions             #      0.838 IPC     ( +-   0.000% )
    70575215911  cache-references         #    740.685 M/sec   ( +-   0.004% )
     2266361085  cache-misses             #     23.785 M/sec   ( +-   0.017% )

   26.909772228  seconds time elapsed   ( +-   0.041% )


 Performance counter stats for 'make -j6' (9 runs):

   95664.586804  task-clock-msecs         #      3.568 CPUs    ( +-   0.020% )
          22358  context-switches         #      0.000 M/sec   ( +-   0.194% )
           1835  CPU-migrations           #      0.000 M/sec   ( +-   0.659% )
        4601777  page-faults              #      0.048 M/sec   ( +-   0.001% )
   240188102235  cycles                   #   2510.732 M/sec   ( +-   0.020% )
   200569036210  instructions             #      0.835 IPC     ( +-   0.000% )
    70565619805  cache-references         #    737.636 M/sec   ( +-   0.006% )
     2265714056  cache-misses             #     23.684 M/sec   ( +-   0.017% )

   26.808072908  seconds time elapsed   ( +-   0.063% )
--------------------------------------------------------------------------------
2.6.31-tip-01385-g1ca1afc:

 Performance counter stats for 'make -j4' (9 runs):

   94873.128287  task-clock-msecs         #      3.422 CPUs    ( +-   0.020% )
          13196  context-switches         #      0.000 M/sec   ( +-   0.181% )
           1777  CPU-migrations           #      0.000 M/sec   ( +-   0.664% )
        4601784  page-faults              #      0.049 M/sec   ( +-   0.001% )
   238126976192  cycles                   #   2509.952 M/sec   ( +-   0.020% )
   200545291785  instructions             #      0.842 IPC     ( +-   0.000% )
    70607104279  cache-references         #    744.227 M/sec   ( +-   0.005% )
     2266980390  cache-misses             #     23.895 M/sec   ( +-   0.022% )

   27.723375828  seconds time elapsed   ( +-   0.134% )


 Performance counter stats for 'make -j5' (9 runs):

   95363.595017  task-clock-msecs         #      3.519 CPUs    ( +-   0.015% )
          15003  context-switches         #      0.000 M/sec   ( +-   0.294% )
           1880  CPU-migrations           #      0.000 M/sec   ( +-   1.017% )
        4601648  page-faults              #      0.048 M/sec   ( +-   0.001% )
   239351549481  cycles                   #   2509.884 M/sec   ( +-   0.015% )
   200552379266  instructions             #      0.838 IPC     ( +-   0.000% )
    70576977633  cache-references         #    740.083 M/sec   ( +-   0.006% )
     2265294365  cache-misses             #     23.754 M/sec   ( +-   0.012% )

   27.096710006  seconds time elapsed   ( +-   0.074% )


 Performance counter stats for 'make -j6' (9 runs):

   95739.941233  task-clock-msecs         #      3.568 CPUs    ( +-   0.024% )
          16327  context-switches         #      0.000 M/sec   ( +-   0.230% )
           1863  CPU-migrations           #      0.000 M/sec   ( +-   0.623% )
        4601715  page-faults              #      0.048 M/sec   ( +-   0.002% )
   240292969273  cycles                   #   2509.851 M/sec   ( +-   0.024% )
   200554772612  instructions             #      0.835 IPC     ( +-   0.000% )
    70566092747  cache-references         #    737.060 M/sec   ( +-   0.004% )
     2264738533  cache-misses             #     23.655 M/sec   ( +-   0.021% )

   26.836474777  seconds time elapsed   ( +-   0.181% )
--------------------------------------------------------------------------------

Note that the disabling NEW_FAIR_SLEEPERS doesn't fix 3% regression from
v2.6.23, but instead makes "make -j4" runtime another 2% worse (27.05 -> 27.72).


[-- Attachment #2: perf cleanup-command patch --]
[-- Type: text/plain, Size: 1716 bytes --]

---
 tools/perf/builtin-stat.c |   18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

Index: linux/tools/perf/builtin-stat.c
===================================================================
--- linux.orig/tools/perf/builtin-stat.c
+++ linux/tools/perf/builtin-stat.c
@@ -44,6 +44,7 @@
 #include "util/parse-events.h"
 #include "util/event.h"
 #include "util/debug.h"
+#include "util/run-command.h"
 
 #include <sys/prctl.h>
 #include <math.h>
@@ -458,7 +459,7 @@ static const struct option options[] = {
 
 int cmd_stat(int argc, const char **argv, const char *prefix __used)
 {
-	int status;
+	int status, j, cleanup, cleanup_argc;
 
 	argc = parse_options(argc, argv, options, stat_usage,
 		PARSE_OPT_STOP_AT_NON_OPTION);
@@ -467,6 +468,19 @@ int cmd_stat(int argc, const char **argv
 	if (run_count <= 0)
 		usage_with_options(stat_usage, options);
 
+	// quick ugly hack: if a "--" appears in the command, treat is as
+	// a delimiter and use remaining part as a "cleanup command",
+	// not affecting performance counters.
+	cleanup = cleanup_argc = 0;
+	for (j = 1; j < (argc-1); j ++) {
+		if (!strcmp (argv[j], "--")) {
+			cleanup = j + 1;
+			cleanup_argc = argc - j - 1;
+			argv[j] = NULL;
+			argc = j;
+		}
+	}
+
 	/* Set attrs and nr_counters if no event is selected and !null_run */
 	if (!null_run && !nr_counters) {
 		memcpy(attrs, default_attrs, sizeof(default_attrs));
@@ -493,6 +507,8 @@ int cmd_stat(int argc, const char **argv
 		if (run_count != 1 && verbose)
 			fprintf(stderr, "[ perf stat: executing run #%d ... ]\n", run_idx + 1);
 		status = run_perf_stat(argc, argv);
+		if (cleanup)
+			run_command_v_opt (&argv [cleanup], 0);
 	}
 
 	print_stat(argc, argv);

  parent reply	other threads:[~2009-09-13 15:27 UTC|newest]

Thread overview: 216+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-06 20:59 BFS vs. mainline scheduler benchmarks and measurements Ingo Molnar
2009-09-07  2:05 ` Frans Pop
2009-09-07 12:16   ` [quad core results] " Ingo Molnar
2009-09-07 12:36     ` Stefan Richter
2009-09-07 13:41     ` Markus Tornqvist
2009-09-07 13:59       ` Ingo Molnar
2009-09-09  5:54         ` Markus Tornqvist
2009-09-07 14:45       ` Arjan van de Ven
2009-09-07 15:20         ` Frans Pop
2009-09-07 15:36           ` Arjan van de Ven
2009-09-07 15:47             ` Frans Pop
2009-09-07 15:24         ` Xavier Bestel
2009-09-07 15:37           ` Arjan van de Ven
2009-09-07 16:00           ` Diego Calleja
2009-09-07 15:34     ` Nikos Chantziaras
2009-09-07  3:38 ` Nikos Chantziaras
2009-09-07 11:01   ` Frederic Weisbecker
2009-09-08 18:15     ` Nikos Chantziaras
2009-09-10 20:25       ` Frederic Weisbecker
2009-09-07 14:40   ` Arjan van de Ven
2009-09-08  7:19     ` Nikos Chantziaras
2009-09-08  8:31       ` Arjan van de Ven
2009-09-08 20:22         ` Frans Pop
2009-09-08 21:10           ` Michal Schmidt
2009-09-08 21:11           ` Frans Pop
2009-09-08 21:40             ` GeunSik Lim
2009-09-08 22:36               ` Frans Pop
2009-09-09  9:53           ` Benjamin Herrenschmidt
2009-09-09 11:14             ` David Newall
2009-09-09 11:32               ` Benjamin Herrenschmidt
2009-09-09 11:55             ` Frans Pop
2009-09-11  1:36               ` Benjamin Herrenschmidt
2009-09-16 18:27                 ` Frans Pop
2009-09-17  1:29                   ` Benjamin Herrenschmidt
2009-10-01  9:36                     ` Frans Pop
2009-09-08  8:38       ` Arjan van de Ven
2009-09-08 10:13         ` Nikos Chantziaras
2009-09-08 11:32           ` Juergen Beisert
2009-09-08 22:00             ` Nikos Chantziaras
2009-09-08 23:20               ` Jiri Kosina
2009-09-08 23:38                 ` Nikos Chantziaras
2009-09-08 12:03           ` Theodore Tso
2009-09-08 21:28             ` Nikos Chantziaras
2009-09-08 14:20           ` Arjan van de Ven
2009-09-08 22:53             ` Nikos Chantziaras
2009-09-07 23:54   ` Thomas Fjellstrom
2009-09-08 11:30     ` Nikos Chantziaras
2009-09-07  3:50 ` Con Kolivas
2009-09-07 18:20   ` Jerome Glisse
2009-09-07  9:49 ` Jens Axboe
2009-09-07 10:12   ` Nikos Chantziaras
2009-09-07 10:41     ` Jens Axboe
2009-09-07 11:57   ` Jens Axboe
2009-09-07 14:14     ` Ingo Molnar
2009-09-07 17:38       ` Jens Axboe
2009-09-07 20:44         ` Jens Axboe
2009-09-08  9:13           ` Jens Axboe
2009-09-08 15:23             ` Peter Zijlstra
2009-09-08 20:34               ` Jens Axboe
2009-09-09  6:13                 ` Ingo Molnar
2009-09-09  8:34                   ` Nikos Chantziaras
2009-09-09  8:52                   ` Mike Galbraith
2009-09-09  9:02                     ` Peter Zijlstra
2009-09-09  9:18                       ` Mike Galbraith
2009-09-09  9:05                     ` Nikos Chantziaras
2009-09-09  9:17                       ` Peter Zijlstra
2009-09-09  9:40                         ` Nikos Chantziaras
2009-09-09 10:17                           ` Nikos Chantziaras
2009-09-10 19:45                         ` Martin Steigerwald
2009-09-10 20:06                           ` Ingo Molnar
2009-09-10 20:39                             ` Martin Steigerwald
2009-09-10 20:42                               ` Ingo Molnar
2009-09-10 21:19                                 ` Martin Steigerwald
2009-09-11  9:26                                   ` Mat
2009-09-12 11:26                                     ` Martin Steigerwald
2009-09-09  9:10                     ` Jens Axboe
2009-09-09 11:54                       ` Jens Axboe
2009-09-09 12:20                         ` Jens Axboe
2009-09-09 18:04                           ` Ingo Molnar
2009-09-09 20:12                             ` Nikos Chantziaras
2009-09-09 20:50                               ` Jens Axboe
2009-09-10  1:02                                 ` Con Kolivas
2009-09-10 11:03                                   ` Jens Axboe
2009-09-10  3:15                               ` Mike Galbraith
2009-09-10  6:08                               ` Ingo Molnar
2009-09-10  6:40                                 ` Ingo Molnar
2009-09-10  9:54                                   ` Jens Axboe
2009-09-10 10:03                                     ` Ingo Molnar
2009-09-10 10:11                                       ` Jens Axboe
2009-09-10 10:28                                         ` Jens Axboe
2009-09-10 10:57                                           ` Mike Galbraith
2009-09-10 11:09                                             ` Jens Axboe
2009-09-10 11:21                                               ` Mike Galbraith
2009-09-10 11:24                                                 ` Jens Axboe
2009-09-10 11:28                                                   ` Mike Galbraith
2009-09-10 11:35                                                     ` Jens Axboe
2009-09-10 11:42                                                       ` Mike Galbraith
2009-09-10 16:02                                 ` Bret Towe
2009-09-10 16:05                                   ` Peter Zijlstra
2009-09-10 16:12                                     ` Bret Towe
2009-09-10 16:26                                       ` Ingo Molnar
2009-09-10 16:33                                         ` Bret Towe
2009-09-10 17:03                                           ` Ingo Molnar
2009-09-10 17:53                                 ` Nikos Chantziaras
2009-09-10 18:46                                   ` Ingo Molnar
2009-09-10 18:51                                   ` [tip:sched/core] sched: Disable NEW_FAIR_SLEEPERS for now tip-bot for Ingo Molnar
2009-09-10 18:57                                   ` [tip:sched/core] sched: Fix sched::sched_stat_wait tracepoint field tip-bot for Ingo Molnar
2009-09-10  9:48                             ` BFS vs. mainline scheduler benchmarks and measurements Jens Axboe
2009-09-10  9:59                               ` Ingo Molnar
2009-09-10 10:01                                 ` Jens Axboe
2009-09-10  6:55                           ` Peter Zijlstra
2009-09-10  6:58                             ` Jens Axboe
2009-09-10  7:04                               ` Ingo Molnar
2009-09-10  9:44                                 ` Jens Axboe
2009-09-10  9:45                                   ` Jens Axboe
2009-09-10 13:53                                   ` Steven Rostedt
2009-09-10  7:33                               ` Jens Axboe
2009-09-10  7:49                                 ` Ingo Molnar
2009-09-10  7:53                                   ` Jens Axboe
2009-09-10 10:02                                     ` Ingo Molnar
2009-09-10 10:09                                       ` Jens Axboe
2009-09-10 18:00                                       ` [crash, bisected] Re: clocksource: Resolve cpu hotplug dead lock with TSC unstable Ingo Molnar
2009-09-11  7:37                                         ` Ingo Molnar
2009-09-11  7:48                                           ` Martin Schwidefsky
2009-09-11 13:33                                           ` Martin Schwidefsky
2009-09-11 18:22                                             ` [tip:timers/core] clocksource: Resolve cpu hotplug dead lock with TSC unstable, fix crash tip-bot for Martin Schwidefsky
2009-09-14 15:19                                             ` [crash, bisected] Re: clocksource: Resolve cpu hotplug dead lock with TSC unstable Ingo Molnar
2009-09-14 15:37                                               ` Martin Schwidefsky
2009-09-14 17:59                                               ` Martin Schwidefsky
2009-09-10  6:59                             ` BFS vs. mainline scheduler benchmarks and measurements Ingo Molnar
2009-09-09 12:48                         ` Mike Galbraith
2009-09-09 15:37                     ` [tip:sched/core] sched: Turn off child_runs_first tip-bot for Mike Galbraith
2009-09-09 17:57                       ` Theodore Tso
2009-09-09 18:08                         ` Ingo Molnar
2009-09-09 18:59                           ` Chris Friesen
2009-09-09 19:48                           ` Pavel Machek
2009-09-09 15:37                     ` [tip:sched/core] sched: Re-tune the scheduler latency defaults to decrease worst-case latencies tip-bot for Mike Galbraith
2009-09-12 11:45                       ` Martin Steigerwald
2009-09-09 15:37                     ` [tip:sched/core] sched: Keep kthreads at default priority tip-bot for Mike Galbraith
2009-09-09 16:55                       ` Dmitry Torokhov
2009-09-09 17:06                         ` Peter Zijlstra
2009-09-09 17:34                           ` Mike Galbraith
2009-09-12 11:48                             ` Martin Steigerwald
2009-09-12 12:19                               ` Mike Galbraith
2009-09-09 11:52               ` BFS vs. mainline scheduler benchmarks and measurements Nikos Chantziaras
2009-09-07 18:02   ` Avi Kivity
2009-09-07 18:46     ` Jens Axboe
2009-09-07 20:36       ` Ingo Molnar
2009-09-07 20:46         ` Jens Axboe
2009-09-07 21:03           ` Peter Zijlstra
2009-09-07 21:05             ` Jens Axboe
2009-09-07 22:18               ` Ingo Molnar
2009-09-09  7:38   ` Pavel Machek
2009-09-10 12:19     ` latt location (Was Re: BFS vs. mainline scheduler benchmarks and measurements) Jens Axboe
2009-09-07 15:16 ` BFS vs. mainline scheduler benchmarks and measurements Michael Buesch
2009-09-07 18:26   ` Ingo Molnar
2009-09-07 18:47     ` Daniel Walker
2009-09-07 18:51     ` Michael Buesch
2009-09-07 20:57       ` Ingo Molnar
2009-09-07 23:24         ` Pekka Pietikainen
2009-09-08  8:04           ` Ingo Molnar
2009-09-08  8:13             ` Nikos Chantziaras
2009-09-08 10:12               ` Ingo Molnar
2009-09-08 10:40                 ` Nikos Chantziaras
2009-09-08 11:35                   ` Ingo Molnar
2009-09-08 19:06                     ` Nikos Chantziaras
2009-09-08 12:00                 ` el_es
2009-09-08 15:45         ` Michael Buesch
2009-09-08  7:48     ` Ingo Molnar
2009-09-08  9:50       ` Benjamin Herrenschmidt
2009-09-08 13:09         ` Ralf Baechle
2009-09-09  1:36           ` Felix Fietkau
2009-09-08 13:09         ` Felix Fietkau
2009-09-09  0:28           ` Benjamin Herrenschmidt
2009-09-09  0:37             ` David Miller
2009-09-08 14:45       ` Michael Buesch
2009-09-18 11:24         ` Ingo Molnar
2009-09-18 14:46           ` Felix Fietkau
2009-09-19 18:01             ` Ingo Molnar
2009-09-19 18:43               ` Felix Fietkau
2009-09-19 19:39                 ` Ingo Molnar
2009-09-19 20:15                   ` Felix Fietkau
2009-09-19 20:22                     ` Ingo Molnar
2009-09-19 20:33                       ` Felix Fietkau
2009-09-20 18:10                         ` Ingo Molnar
2009-09-08 12:57 ` Epic regression in throughput since v2.6.23 Serge Belyshev
2009-09-08 17:47   ` Jesse Brandeburg
2009-09-08 18:20     ` Nikos Chantziaras
2009-09-08 19:00     ` Jeff Garzik
2009-09-08 19:20       ` Serge Belyshev
2009-09-08 19:26         ` Jeff Garzik
2009-09-08 18:37   ` Nikos Chantziaras
2009-09-08 22:15   ` Serge Belyshev
2009-09-09 15:52     ` Ingo Molnar
2009-09-09 20:49       ` Serge Belyshev
2009-09-09 21:23         ` Cory Fields
2009-09-10  6:53         ` Ingo Molnar
2009-09-10 23:23           ` Serge Belyshev
2009-09-11  6:10             ` Ingo Molnar
2009-09-11  8:55               ` Serge Belyshev
2009-09-13 15:27               ` Serge Belyshev [this message]
2009-09-13 15:47                 ` Ingo Molnar
2009-09-13 19:17                   ` Mike Galbraith
2009-09-14  6:15                     ` Mike Galbraith
2009-09-16 19:45                 ` Ingo Molnar
2009-09-16 23:18                   ` Serge Belyshev
2009-09-17  4:55                     ` [patchlet] " Mike Galbraith
2009-09-17  5:06                       ` Mike Galbraith
2009-09-17  7:21                         ` Ingo Molnar
2009-09-10  7:43 ` [updated] BFS vs. mainline scheduler benchmarks and measurements Ingo Molnar
2009-09-14  9:46 ` Phoronix CFS vs BFS bencharks Nikos Chantziaras
2009-09-14 11:35   ` Mike Galbraith
     [not found]     ` <f42384a10909140727k463ff460q3859892dcb79bcc5@mail.gmail.com>
2009-09-14 15:32       ` Mike Galbraith
2009-09-14 19:14         ` Marcin Letyns
2009-09-14 20:49           ` Willy Tarreau
2009-09-15  8:37             ` 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=87iqfmx3tr.fsf@depni.sinp.msu.ru \
    --to=belyshev@depni.sinp.msu.ru \
    --cc=a.p.zijlstra@chello.nl \
    --cc=efault@gmx.de \
    --cc=kernel@kolivas.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome