^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright (C) 2013 Davidlohr Bueso <davidlohr@hp.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * futex-requeue: Block a bunch of threads on futex1 and requeue them
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * on futex2, N at a time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * This program is particularly useful to measure the latency of nthread
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * requeues without waking up any tasks -- thus mimicking a regular futex_wait.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) /* For the CLR_() macros */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <string.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <pthread.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <signal.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include "../util/stat.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #include <subcmd/parse-options.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include <linux/compiler.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #include <linux/time64.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #include <errno.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #include <internal/cpumap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #include <perf/cpumap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #include "bench.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #include "futex.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #include <err.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #include <stdlib.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #include <sys/time.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) static u_int32_t futex1 = 0, futex2 = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) * How many tasks to requeue at a time.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) * Default to 1 in order to make the kernel work more.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) static unsigned int nrequeue = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) static pthread_t *worker;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) static bool done = false, silent = false, fshared = false;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) static pthread_mutex_t thread_lock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) static pthread_cond_t thread_parent, thread_worker;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) static struct stats requeuetime_stats, requeued_stats;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) static unsigned int threads_starting, nthreads = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) static int futex_flag = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) static const struct option options[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) OPT_UINTEGER('t', "threads", &nthreads, "Specify amount of threads"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) OPT_UINTEGER('q', "nrequeue", &nrequeue, "Specify amount of threads to requeue at once"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) OPT_BOOLEAN( 's', "silent", &silent, "Silent mode: do not display data/details"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) OPT_BOOLEAN( 'S', "shared", &fshared, "Use shared futexes instead of private ones"),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) OPT_END()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) static const char * const bench_futex_requeue_usage[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) "perf bench futex requeue <options>",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) static void print_summary(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) double requeuetime_avg = avg_stats(&requeuetime_stats);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) double requeuetime_stddev = stddev_stats(&requeuetime_stats);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) unsigned int requeued_avg = avg_stats(&requeued_stats);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) printf("Requeued %d of %d threads in %.4f ms (+-%.2f%%)\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) requeued_avg,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) nthreads,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) requeuetime_avg / USEC_PER_MSEC,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) rel_stddev_stats(requeuetime_stddev, requeuetime_avg));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) static void *workerfn(void *arg __maybe_unused)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) pthread_mutex_lock(&thread_lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) threads_starting--;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) if (!threads_starting)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) pthread_cond_signal(&thread_parent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) pthread_cond_wait(&thread_worker, &thread_lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) pthread_mutex_unlock(&thread_lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) futex_wait(&futex1, 0, NULL, futex_flag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) return NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) static void block_threads(pthread_t *w,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) pthread_attr_t thread_attr, struct perf_cpu_map *cpu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) cpu_set_t cpuset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) unsigned int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) threads_starting = nthreads;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) /* create and block all threads */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) for (i = 0; i < nthreads; i++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) CPU_ZERO(&cpuset);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) CPU_SET(cpu->map[i % cpu->nr], &cpuset);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) if (pthread_attr_setaffinity_np(&thread_attr, sizeof(cpu_set_t), &cpuset))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) err(EXIT_FAILURE, "pthread_attr_setaffinity_np");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) if (pthread_create(&w[i], &thread_attr, workerfn, NULL))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) err(EXIT_FAILURE, "pthread_create");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) static void toggle_done(int sig __maybe_unused,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) siginfo_t *info __maybe_unused,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) void *uc __maybe_unused)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) done = true;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) int bench_futex_requeue(int argc, const char **argv)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) int ret = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) unsigned int i, j;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) struct sigaction act;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) pthread_attr_t thread_attr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) struct perf_cpu_map *cpu;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) argc = parse_options(argc, argv, options, bench_futex_requeue_usage, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) if (argc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) goto err;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) cpu = perf_cpu_map__new(NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) if (!cpu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) err(EXIT_FAILURE, "cpu_map__new");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) memset(&act, 0, sizeof(act));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) sigfillset(&act.sa_mask);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) act.sa_sigaction = toggle_done;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) sigaction(SIGINT, &act, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) if (!nthreads)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) nthreads = cpu->nr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) worker = calloc(nthreads, sizeof(*worker));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) if (!worker)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) err(EXIT_FAILURE, "calloc");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) if (!fshared)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) futex_flag = FUTEX_PRIVATE_FLAG;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) if (nrequeue > nthreads)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) nrequeue = nthreads;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) printf("Run summary [PID %d]: Requeuing %d threads (from [%s] %p to %p), "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) "%d at a time.\n\n", getpid(), nthreads,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) fshared ? "shared":"private", &futex1, &futex2, nrequeue);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) init_stats(&requeued_stats);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) init_stats(&requeuetime_stats);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) pthread_attr_init(&thread_attr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) pthread_mutex_init(&thread_lock, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) pthread_cond_init(&thread_parent, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) pthread_cond_init(&thread_worker, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) for (j = 0; j < bench_repeat && !done; j++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) unsigned int nrequeued = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) struct timeval start, end, runtime;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) /* create, launch & block all threads */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) block_threads(worker, thread_attr, cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) /* make sure all threads are already blocked */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) pthread_mutex_lock(&thread_lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) while (threads_starting)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) pthread_cond_wait(&thread_parent, &thread_lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) pthread_cond_broadcast(&thread_worker);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) pthread_mutex_unlock(&thread_lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) usleep(100000);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) /* Ok, all threads are patiently blocked, start requeueing */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) gettimeofday(&start, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) while (nrequeued < nthreads) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) * Do not wakeup any tasks blocked on futex1, allowing
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) * us to really measure futex_wait functionality.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) nrequeued += futex_cmp_requeue(&futex1, 0, &futex2, 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) nrequeue, futex_flag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) gettimeofday(&end, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) timersub(&end, &start, &runtime);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) update_stats(&requeued_stats, nrequeued);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) update_stats(&requeuetime_stats, runtime.tv_usec);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) if (!silent) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) printf("[Run %d]: Requeued %d of %d threads in %.4f ms\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) j + 1, nrequeued, nthreads, runtime.tv_usec / (double)USEC_PER_MSEC);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) /* everybody should be blocked on futex2, wake'em up */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) nrequeued = futex_wake(&futex2, nrequeued, futex_flag);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) if (nthreads != nrequeued)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) warnx("couldn't wakeup all tasks (%d/%d)", nrequeued, nthreads);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) for (i = 0; i < nthreads; i++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) ret = pthread_join(worker[i], NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) err(EXIT_FAILURE, "pthread_join");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) /* cleanup & report results */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) pthread_cond_destroy(&thread_parent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) pthread_cond_destroy(&thread_worker);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) pthread_mutex_destroy(&thread_lock);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) pthread_attr_destroy(&thread_attr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) print_summary();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) free(worker);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) perf_cpu_map__put(cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) err:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) usage_with_options(bench_futex_requeue_usage, options);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) exit(EXIT_FAILURE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) }