Commit 08942f6d authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo

perf bench: Documentation update

The current perf-bench documentation has a couple of typos and even
lacks entire description of mem subsystem. Fix it.
Reported-by: default avatarIngo Molnar <mingo@kernel.org>
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Acked-by: default avatarHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1340172486-17805-1-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 209bd9e3
...@@ -12,7 +12,7 @@ SYNOPSIS ...@@ -12,7 +12,7 @@ SYNOPSIS
DESCRIPTION DESCRIPTION
----------- -----------
This 'perf bench' command is general framework for benchmark suites. This 'perf bench' command is a general framework for benchmark suites.
COMMON OPTIONS COMMON OPTIONS
-------------- --------------
...@@ -45,14 +45,20 @@ SUBSYSTEM ...@@ -45,14 +45,20 @@ SUBSYSTEM
'sched':: 'sched'::
Scheduler and IPC mechanisms. Scheduler and IPC mechanisms.
'mem'::
Memory access performance.
'all'::
All benchmark subsystems.
SUITES FOR 'sched' SUITES FOR 'sched'
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
*messaging*:: *messaging*::
Suite for evaluating performance of scheduler and IPC mechanisms. Suite for evaluating performance of scheduler and IPC mechanisms.
Based on hackbench by Rusty Russell. Based on hackbench by Rusty Russell.
Options of *pipe* Options of *messaging*
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^
-p:: -p::
--pipe:: --pipe::
Use pipe() instead of socketpair() Use pipe() instead of socketpair()
...@@ -115,6 +121,72 @@ Example of *pipe* ...@@ -115,6 +121,72 @@ Example of *pipe*
59004 ops/sec 59004 ops/sec
--------------------- ---------------------
SUITES FOR 'mem'
~~~~~~~~~~~~~~~~
*memcpy*::
Suite for evaluating performance of simple memory copy in various ways.
Options of *memcpy*
^^^^^^^^^^^^^^^^^^^
-l::
--length::
Specify length of memory to copy (default: 1MB).
Available units are B, KB, MB, GB and TB (case insensitive).
-r::
--routine::
Specify routine to copy (default: default).
Available routines are depend on the architecture.
On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported.
-i::
--iterations::
Repeat memcpy invocation this number of times.
-c::
--clock::
Use perf's cpu-cycles event instead of gettimeofday syscall.
-o::
--only-prefault::
Show only the result with page faults before memcpy.
-n::
--no-prefault::
Show only the result without page faults before memcpy.
*memset*::
Suite for evaluating performance of simple memory set in various ways.
Options of *memset*
^^^^^^^^^^^^^^^^^^^
-l::
--length::
Specify length of memory to set (default: 1MB).
Available units are B, KB, MB, GB and TB (case insensitive).
-r::
--routine::
Specify routine to set (default: default).
Available routines are depend on the architecture.
On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported.
-i::
--iterations::
Repeat memset invocation this number of times.
-c::
--clock::
Use perf's cpu-cycles event instead of gettimeofday syscall.
-o::
--only-prefault::
Show only the result with page faults before memset.
-n::
--no-prefault::
Show only the result without page faults before memset.
SEE ALSO SEE ALSO
-------- --------
linkperf:perf[1] linkperf:perf[1]
...@@ -32,13 +32,13 @@ static bool no_prefault; ...@@ -32,13 +32,13 @@ static bool no_prefault;
static const struct option options[] = { static const struct option options[] = {
OPT_STRING('l', "length", &length_str, "1MB", OPT_STRING('l', "length", &length_str, "1MB",
"Specify length of memory to copy. " "Specify length of memory to copy. "
"available unit: B, MB, GB (upper and lower)"), "Available units: B, KB, MB, GB and TB (upper and lower)"),
OPT_STRING('r', "routine", &routine, "default", OPT_STRING('r', "routine", &routine, "default",
"Specify routine to copy"), "Specify routine to copy"),
OPT_INTEGER('i', "iterations", &iterations, OPT_INTEGER('i', "iterations", &iterations,
"repeat memcpy() invocation this number of times"), "repeat memcpy() invocation this number of times"),
OPT_BOOLEAN('c', "clock", &use_clock, OPT_BOOLEAN('c', "clock", &use_clock,
"Use CPU clock for measuring"), "Use cycles event instead of gettimeofday() for measuring"),
OPT_BOOLEAN('o', "only-prefault", &only_prefault, OPT_BOOLEAN('o', "only-prefault", &only_prefault,
"Show only the result with page faults before memcpy()"), "Show only the result with page faults before memcpy()"),
OPT_BOOLEAN('n', "no-prefault", &no_prefault, OPT_BOOLEAN('n', "no-prefault", &no_prefault,
......
...@@ -31,14 +31,14 @@ static bool no_prefault; ...@@ -31,14 +31,14 @@ static bool no_prefault;
static const struct option options[] = { static const struct option options[] = {
OPT_STRING('l', "length", &length_str, "1MB", OPT_STRING('l', "length", &length_str, "1MB",
"Specify length of memory to copy. " "Specify length of memory to set. "
"available unit: B, MB, GB (upper and lower)"), "Available units: B, KB, MB, GB and TB (upper and lower)"),
OPT_STRING('r', "routine", &routine, "default", OPT_STRING('r', "routine", &routine, "default",
"Specify routine to copy"), "Specify routine to set"),
OPT_INTEGER('i', "iterations", &iterations, OPT_INTEGER('i', "iterations", &iterations,
"repeat memset() invocation this number of times"), "repeat memset() invocation this number of times"),
OPT_BOOLEAN('c', "clock", &use_clock, OPT_BOOLEAN('c', "clock", &use_clock,
"Use CPU clock for measuring"), "Use cycles event instead of gettimeofday() for measuring"),
OPT_BOOLEAN('o', "only-prefault", &only_prefault, OPT_BOOLEAN('o', "only-prefault", &only_prefault,
"Show only the result with page faults before memset()"), "Show only the result with page faults before memset()"),
OPT_BOOLEAN('n', "no-prefault", &no_prefault, OPT_BOOLEAN('n', "no-prefault", &no_prefault,
......
...@@ -33,7 +33,7 @@ struct bench_suite { ...@@ -33,7 +33,7 @@ struct bench_suite {
}; };
\ \
/* sentinel: easy for help */ /* sentinel: easy for help */
#define suite_all { "all", "test all suite (pseudo suite)", NULL } #define suite_all { "all", "Test all benchmark suites", NULL }
static struct bench_suite sched_suites[] = { static struct bench_suite sched_suites[] = {
{ "messaging", { "messaging",
...@@ -75,7 +75,7 @@ static struct bench_subsys subsystems[] = { ...@@ -75,7 +75,7 @@ static struct bench_subsys subsystems[] = {
"memory access performance", "memory access performance",
mem_suites }, mem_suites },
{ "all", /* sentinel: easy for help */ { "all", /* sentinel: easy for help */
"test all subsystem (pseudo subsystem)", "all benchmark subsystem",
NULL }, NULL },
{ NULL, { NULL,
NULL, NULL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment