Lines Matching +full:wakeup +full:- +full:latency
1 // SPDX-License-Identifier: GPL-2.0
5 * Block a bunch of threads and let parallel waker threads wakeup an
6 * equal amount of them. The program output reflects the avg latency
27 #include <subcmd/parse-options.h>
46 /* all threads will block on the same futex -- hash bucket chaos ;) */
68 "perf bench futex wake-parallel <options>",
81 waker->nwoken = futex_wake(&futex, nwakes, futex_flag); in waking_workerfn()
82 if (waker->nwoken != nwakes) in waking_workerfn()
83 warnx("couldn't wakeup all tasks (%d/%d)", in waking_workerfn()
84 waker->nwoken, nwakes); in waking_workerfn()
87 timersub(&end, &start, &waker->runtime); in waking_workerfn()
104 * Thread creation order will impact per-thread latency in wakeup_threads()
125 threads_starting--; in blocked_workerfn()
151 CPU_SET(cpu->map[i % cpu->nr], &cpuset); in block_threads()
179 printf("[Run %d]: Avg per-thread latency (waking %d/%d threads) " in print_run()
180 "in %.4f ms (+-%.2f%%)\n", run_num + 1, wakeup_avg, in print_run()
194 printf("Avg per-thread latency (waking %d/%d threads) in %.4f ms (+-%.2f%%)\n", in print_summary()
245 nblocked_threads = cpu->nr; in bench_futex_wake_parallel()
254 * Each thread will wakeup nwakes tasks in in bench_futex_wake_parallel()