mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
7af4c8a6a9
This lock protects a linked-list. In all cases but one, the only operation done while holding the lock is to remove a single item from the list and decrement a counter. Acquiring a mutex itself involves multiple linked-list operations protected by spinlocks, so cut out the overhead and just use a spinlock directly. In the one case where we do more than just remove an item, we hold an additional write-lock, and so we don't run any risk of causing "spinlock could not be acquired for a long time" KDLs, as in that case the threads will be waiting on the rwlock instead. Reduces lock contention in the VFS. Compiling HaikuDepot and the mime_db with -j4 (in a VM), the sys time decreased a bit (~10.1s to ~9.9s), and real time went down by more (~31s to ~29s.) "git status" performance also improved a bit, but we seem to be contending for vnode locks now in that case. |
||
---|---|---|
.. | ||
add-ons | ||
apps | ||
bin | ||
build | ||
data | ||
kits | ||
libs | ||
preferences | ||
servers | ||
system | ||
tests | ||
tools | ||
Jamfile |