summaryrefslogtreecommitdiff
path: root/tools/perf/bench/bench.h
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2015-07-07 11:55:53 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-07-20 23:49:51 +0300
commitd2f3f5d2e9cae6e73f9642a5ddc8c8a07c35e79b (patch)
tree76994d160a27adaab0a7263c2697afdcae4f5df5 /tools/perf/bench/bench.h
parent52c0a18b9010fb19d10889e8a00aa784197d357c (diff)
downloadlinux-d2f3f5d2e9cae6e73f9642a5ddc8c8a07c35e79b.tar.xz
perf bench futex: Add lock_pi stresser
Allows a way of measuring low level kernel implementation of FUTEX_LOCK_PI and FUTEX_UNLOCK_PI. The program comes in two flavors: (i) single futex (default), all threads contend on the same uaddr. For the sake of the benchmark, we call into kernel space even when the lock is uncontended. The kernel will set it to TID, any waters that come in and contend for the pi futex will be handled respectively by the kernel. (ii) -M option for multiple futexes, each thread deals with its own futex. This is a trivial scenario and only measures kernel handling of 0->TID transition. Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Cc: Mel Gorman <mgorman@suse.de> Link: http://lkml.kernel.org/r/1436259353.12255.78.camel@stgolabs.net Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/bench/bench.h')
-rw-r--r--tools/perf/bench/bench.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h
index 70b2f718cc21..a50df86f2b9b 100644
--- a/tools/perf/bench/bench.h
+++ b/tools/perf/bench/bench.h
@@ -36,6 +36,8 @@ extern int bench_futex_wake(int argc, const char **argv, const char *prefix);
extern int bench_futex_wake_parallel(int argc, const char **argv,
const char *prefix);
extern int bench_futex_requeue(int argc, const char **argv, const char *prefix);
+/* pi futexes */
+extern int bench_futex_lock_pi(int argc, const char **argv, const char *prefix);
#define BENCH_FORMAT_DEFAULT_STR "default"
#define BENCH_FORMAT_DEFAULT 0