perf bench futex: Add --mlockall parameter
authorDavidlohr Bueso <dave@stgolabs.net>
Mon, 9 Aug 2021 04:32:58 +0000 (21:32 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 9 Aug 2021 15:00:04 +0000 (12:00 -0300)
commit9f9a3ffe94f263388b99cb75e4ec374e31aaeb0f
treebc35c452426a5763e94488dc91377a2683f4ef1b
parentb2105a75703ebe098710beedc7a1685f67010675
perf bench futex: Add --mlockall parameter

This adds, across all futex benchmarks, the -m/--mlockall option
which is a common operation for realtime workloads by not incurring
in page faults in paths that want determinism. As such, threads
started after a call to mlockall(2) will generate page faults
immediately since the new stack is immediately forced to memory,
due to the MCL_FUTURE flag.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Davidlohr Bueso <dbueso@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lore.kernel.org/lkml/20210809043301.66002-5-dave@stgolabs.net
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/bench/futex-hash.c
tools/perf/bench/futex-lock-pi.c
tools/perf/bench/futex-requeue.c
tools/perf/bench/futex-wake-parallel.c
tools/perf/bench/futex-wake.c
tools/perf/bench/futex.h