Lines Matching +full:exit +full:- +full:latency +full:- +full:us

1 // SPDX-License-Identifier: GPL-2.0-only
33 * Any bug related to task migration is likely to be timing-dependent; perform
89 * is in-progress, while a completely different count indicates in migration_worker()
96 * stable, i.e. while changing affinity is in-progress. in migration_worker()
108 * Wait 1-10us before proceeding to the next iteration and more in migration_worker()
118 * the guest, the guest will trigger a IO/MMIO exit all the in migration_worker()
120 * the generic "exit to userspace" logic, not by KVM. The in migration_worker()
121 * exit to userspace is necessary to give the test a chance in migration_worker()
125 * to trigger an exit that is handled by KVM, but any such in migration_worker()
126 * exit requires architecture specific code. in migration_worker()
135 * 3. To ensure the read-side makes efficient forward progress, in migration_worker()
136 * e.g. if getcpu() involves a syscall. Stalling the read-side in migration_worker()
138 * to stabilize and less time trying to hit the timing-dependent in migration_worker()
141 * Because any bug in this area is likely to be timing-dependent, in migration_worker()
142 * run with a range of delays at 1us intervals from 1us to 10us in migration_worker()
147 * The original bug can reproduce with a delay up to ~500us on in migration_worker()
148 * x86-64, but starts to require more iterations to reproduce in migration_worker()
149 * as the delay creeps above ~10us, and the average runtime of in migration_worker()
151 * at 10us to keep test runtime reasonable while minimizing in migration_worker()
154 * The lower bound for reproducing the bug is likely below 1us, in migration_worker()
155 * e.g. failures occur on x86-64 with nanosleep(0), but at that in migration_worker()
179 min_cpu = -1; in calc_min_max_cpu()
180 max_cpu = -1; in calc_min_max_cpu()
186 if (min_cpu == -1) in calc_min_max_cpu()
199 printf("usage: %s [-h] [-u] [-l latency]\n", name); in help()
200 printf(" -u: Don't sanity check the number of successful KVM_RUNs\n"); in help()
201 printf(" -l: Set /dev/cpu_dma_latency to suppress deep sleep states\n"); in help()
203 exit(0); in help()
208 int r, i, snapshot, opt, fd = -1, latency = -1; in main() local
214 while ((opt = getopt(argc, argv, "hl:u")) != -1) { in main()
219 latency = atoi_paranoid(optarg); in main()
248 if (latency >= 0) { in main()
251 * open, i.e. it allows userspace to provide guaranteed latency in main()
258 r = write(fd, &latency, 4); in main()
271 * count is odd (migration in-progress). in main()
276 * i.e. if a migration is in-progress. in main()
304 * conservative ratio on x86-64, which can do _more_ KVM_RUNs than in main()
305 * migrations given the 1us+ delay in the migration task. in main()
308 * on systems with large low power mode wakeup latency, it may happen in main()
314 " Try disabling deep sleep states to reduce CPU wakeup latency,\n" in main()
315 " e.g. via cpuidle.off=1 or via -l <latency>, or run with -u to\n" in main()