[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1445290774-13344-5-git-send-email-acme@kernel.org>
Date: Mon, 19 Oct 2015 18:39:15 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org, David Ahern <dsahern@...il.com>,
Hitoshi Mitake <mitake@....info.waseda.ac.jp>,
Jiri Olsa <jolsa@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: [PATCH 04/23] perf bench: Default to all routines in 'perf bench mem'
From: Ingo Molnar <mingo@...nel.org>
So few people know that the --routine option to 'perf bench memcpy/memset'
exists, and would not know that it's capable of testing the kernel's
memcpy/memset implementations.
Furthermore, 'perf bench mem all' will not run all routines:
vega:~> perf bench mem all
# Running mem/memcpy benchmark...
Routine default (Default memcpy() provided by glibc)
# Copying 1MB Bytes ...
894.454383 MB/Sec
3.844734 GB/Sec (with prefault)
# Running mem/memset benchmark...
Routine default (Default memset() provided by glibc)
# Copying 1MB Bytes ...
1.220703 GB/Sec
9.042245 GB/Sec (with prefault)
Because misleadingly the 'all' refers to 'all sub-benchmarks', not 'all
sub-benchmarks and routines'.
Fix all this by making the memcpy/memset routine to default to 'all',
which results in all the benchmarks being run:
triton:~> perf bench mem all
# Running mem/memcpy benchmark...
Routine default (Default memcpy() provided by glibc)
# Copying 1MB Bytes ...
1.448906 GB/Sec
4.957170 GB/Sec (with prefault)
Routine x86-64-unrolled (unrolled memcpy() in arch/x86/lib/memcpy_64.S)
# Copying 1MB Bytes ...
1.614153 GB/Sec
4.379204 GB/Sec (with prefault)
Routine x86-64-movsq (movsq-based memcpy() in arch/x86/lib/memcpy_64.S)
# Copying 1MB Bytes ...
1.570036 GB/Sec
4.264465 GB/Sec (with prefault)
Routine x86-64-movsb (movsb-based memcpy() in arch/x86/lib/memcpy_64.S)
# Copying 1MB Bytes ...
1.788576 GB/Sec
6.554111 GB/Sec (with prefault)
# Running mem/memset benchmark...
Routine default (Default memset() provided by glibc)
# Copying 1MB Bytes ...
2.082223 GB/Sec
9.126752 GB/Sec (with prefault)
Routine x86-64-unrolled (unrolled memset() in arch/x86/lib/memset_64.S)
# Copying 1MB Bytes ...
5.710892 GB/Sec
8.346688 GB/Sec (with prefault)
Routine x86-64-stosq (movsq-based memset() in arch/x86/lib/memset_64.S)
# Copying 1MB Bytes ...
9.765625 GB/Sec
12.520032 GB/Sec (with prefault)
Routine x86-64-stosb (movsb-based memset() in arch/x86/lib/memset_64.S)
# Copying 1MB Bytes ...
9.668936 GB/Sec
12.682630 GB/Sec (with prefault)
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Hitoshi Mitake <mitake@....info.waseda.ac.jp>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/1445241870-24854-3-git-send-email-mingo@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/bench/mem-memcpy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c
index 27606ff5c4f9..263f84171ae5 100644
--- a/tools/perf/bench/mem-memcpy.c
+++ b/tools/perf/bench/mem-memcpy.c
@@ -24,7 +24,7 @@
#define K 1024
static const char *length_str = "1MB";
-static const char *routine = "default";
+static const char *routine = "all";
static int iterations = 1;
static bool use_cycle;
static int cycle_fd;
@@ -35,7 +35,7 @@ static const struct option options[] = {
OPT_STRING('l', "length", &length_str, "1MB",
"Specify length of memory to copy. "
"Available units: B, KB, MB, GB and TB (upper and lower)"),
- OPT_STRING('r', "routine", &routine, "default",
+ OPT_STRING('r', "routine", &routine, "all",
"Specify routine to copy, \"all\" runs all available routines"),
OPT_INTEGER('i', "iterations", &iterations,
"repeat memcpy() invocation this number of times"),
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists