Lines Matching +full:- +full:- +full:threads

1 // SPDX-License-Identifier: GPL-2.0
5 * Block a bunch of threads and let parallel waker threads wakeup an
27 #include <subcmd/parse-options.h>
47 /* all threads will block on the same futex -- hash bucket chaos ;) */
61 OPT_UINTEGER('t', "threads", &nblocked_threads, "Specify amount of threads"),
62 OPT_UINTEGER('w', "nwakers", &nwaking_threads, "Specify amount of waking threads"),
69 "perf bench futex wake-parallel <options>",
82 waker->nwoken = futex_wake(&futex, nwakes, futex_flag); in waking_workerfn()
83 if (waker->nwoken != nwakes) in waking_workerfn()
85 waker->nwoken, nwakes); in waking_workerfn()
88 timersub(&end, &start, &waker->runtime); in waking_workerfn()
102 /* create and block all threads */ in wakeup_threads()
105 * Thread creation order will impact per-thread latency in wakeup_threads()
126 threads_starting--; in blocked_workerfn()
149 /* create and block all threads */ in block_threads()
152 CPU_SET(cpu->map[i % cpu->nr], &cpuset); in block_threads()
180 printf("[Run %d]: Avg per-thread latency (waking %d/%d threads) " in print_run()
181 "in %.4f ms (+-%.2f%%)\n", run_num + 1, wakeup_avg, in print_run()
195 printf("Avg per-thread latency (waking %d/%d threads) in %.4f ms (+-%.2f%%)\n", in print_summary()
247 nblocked_threads = cpu->nr; in bench_futex_wake_parallel()
268 printf("Run summary [PID %d]: blocking on %d threads (at [%s] " in bench_futex_wake_parallel()
269 "futex %p), %d threads waking up %d at a time.\n\n", in bench_futex_wake_parallel()
286 /* create, launch & block all threads */ in bench_futex_wake_parallel()
289 /* make sure all threads are already blocked */ in bench_futex_wake_parallel()
298 /* Ok, all threads are patiently blocked, start waking folks up */ in bench_futex_wake_parallel()