]> git.baikalelectronics.ru Git - kernel.git/commit
perf bench futex: Add lock_pi stresser
authorDavidlohr Bueso <dave@stgolabs.net>
Tue, 7 Jul 2015 08:55:53 +0000 (01:55 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 20 Jul 2015 20:49:51 +0000 (17:49 -0300)
commitb7449ef4e383d647d9fec7bb81c7873719b9d6a6
tree76994d160a27adaab0a7263c2697afdcae4f5df5
parent8df82877ce014dc548f34f2d7fa6989029b85487
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>
tools/perf/Documentation/perf-bench.txt
tools/perf/bench/Build
tools/perf/bench/bench.h
tools/perf/bench/futex-lock-pi.c [new file with mode: 0644]
tools/perf/bench/futex.h
tools/perf/builtin-bench.c