summaryrefslogtreecommitdiffstats
path: root/sys/dev/pv/xen.c
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2017-07-17 16:04:31 +0000
committermikeb <mikeb@openbsd.org>2017-07-17 16:04:31 +0000
commite885e14e7616a60b3d766dd30f26dafb03274a71 (patch)
treefa5819a0357e73eadc944481673e9fc3ea8088ef /sys/dev/pv/xen.c
parentPick the correct TX buffer when unrolling (diff)
downloadwireguard-openbsd-e885e14e7616a60b3d766dd30f26dafb03274a71.tar.xz
wireguard-openbsd-e885e14e7616a60b3d766dd30f26dafb03274a71.zip
Reduce amount of CAS attempts in a busy-wait loop by a factor of 100
Diffstat (limited to 'sys/dev/pv/xen.c')
-rw-r--r--sys/dev/pv/xen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pv/xen.c b/sys/dev/pv/xen.c
index b7611ebbece..f2630156aac 100644
--- a/sys/dev/pv/xen.c
+++ b/sys/dev/pv/xen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xen.c,v 1.85 2017/07/14 21:53:34 mikeb Exp $ */
+/* $OpenBSD: xen.c,v 1.86 2017/07/17 16:04:31 mikeb Exp $ */
/*
* Copyright (c) 2015, 2016, 2017 Mike Belopuhov
@@ -1212,7 +1212,7 @@ xen_grant_table_remove(struct xen_softc *sc, grant_ref_t ref)
(ge->ge_table[ref].domid << 16);
loop = 0;
while (atomic_cas_uint(ptr, flags, GTF_invalid) != flags) {
- if (loop++ > 1000) {
+ if (loop++ > 10) {
printf("%s: grant table reference %u is held "
"by domain %d\n", sc->sc_dev.dv_xname, ref +
ge->ge_start, ge->ge_table[ref].domid);