Switch pending event clearing to an atomic swap operation
authormikeb <mikeb@openbsd.org>
Fri, 5 Aug 2016 18:31:21 +0000 (18:31 +0000)
committermikeb <mikeb@openbsd.org>
Fri, 5 Aug 2016 18:31:21 +0000 (18:31 +0000)
commit30494642db82acd378f52a5034c9b671ff98f9f2
tree6917e41e41ff275d0ceb0c73e164552e3355ea73
parentef2198aad1cba51dff27ca5c9680c6c9a5fc608b
Switch pending event clearing to an atomic swap operation

Rather than performing an atomic bit clearing for every encountered
event bit set we can adjust the code to perform an atomic swap of a
single row of the events array and decrease the amount of expensive
atomic operations.

Same optimization as for Hyper-V.  From FreeBSD.
sys/dev/pv/xen.c