path: root/tools/perf/bench/futex-hash.c
AgeCommit message (Collapse)AuthorFilesLines
2014-09-29perf bench futex: Support operations for shared futexesDavidlohr Bueso1-2/+5
Unlike futex-hash, requeuing and wakeup benchmarks do not support shared futexes, limiting the usefulness of the programs. Correct this, and allow using the local -S parameter. The default remains using private futexes. Signed-off-by: Davidlohr Bueso <> Cc: Davidlohr Bueso <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
2014-03-14perf bench: Add futex-hash microbenchmarkDavidlohr Bueso1-0/+212
Introduce futexes to perf-bench and add a program that stresses and measures the kernel's implementation of the hash table. This is a multi-threaded program that simply measures the amount of failed futex wait calls - we only want to deal with the hashing overhead, so a negative return of futex_wait_setup() is enough to do the trick. An example run: $ perf bench futex hash -t 32 Run summary [PID 10989]: 32 threads, each operating on 1024 [private] futexes for 10 secs. [thread 0] futexes: 0x19d9b10 ... 0x19dab0c [ 418713 ops/sec ] [thread 1] futexes: 0x19daca0 ... 0x19dbc9c [ 469913 ops/sec ] [thread 2] futexes: 0x19dbe30 ... 0x19dce2c [ 479744 ops/sec ] ... [thread 31] futexes: 0x19fbb80 ... 0x19fcb7c [ 464179 ops/sec ] Averaged 454310 operations/sec (+- 0.84%), total secs = 10 Signed-off-by: Davidlohr Bueso <> Acked-by: Darren Hart <> Cc: Aswin Chandramouleeswaran <> Cc: Darren Hart <> Cc: Ingo Molnar <> Cc: Jason Low <> Cc: Peter Zijlstra <> Cc: Scott J Norton <> Cc: Thomas Gleixner <> Cc: Waiman Long <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>