The current implementation spins for an arbitrary time and goes off cpu, which I can see on dtrace when doing -j 104 tinderbox on a kernel with other patches. Use an sx lock instead.
commit 1d17a05b7ecad6028d2ec9ee1e65d840dc4fafb1
Author: Mateusz Guzik <mjg@FreeBSD.org>
Date: Fri Aug 12 16:35:23 2022 +0000
linux: employ umtxq_busy_unlocked
Reviewed by:
Differential Revision:
commit 2bdd0429def9352ce0820285a020b92eed709653
Author: Mateusz Guzik <mjg@FreeBSD.org>
Date: Thu Aug 4 16:08:32 2022 +0000
umtx: employ umtxq_busy_unlocked
commit 05ed23714fbf385e299f8ba2a6702317b5014130
Author: Mateusz Guzik <mjg@FreeBSD.org>
Date: Thu Aug 4 16:04:02 2022 +0000
umtx: convert busy to sx lock
This avoids the highly pessimal scheme of arbitrarily spinning
BUSY_SPINS times. In face of contention this almost always
ends in going off cpu anyway.