haiku/src
Augustin Cavalier 7af4c8a6a9 kernel/fs: Use a spinlock for the unused-vnodes lock.
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.
2024-11-18 13:59:25 -05:00
..
add-ons PadBlocker: Avoid blocking non-trackpad devices 2024-11-18 16:45:04 +00:00
apps HaikuDepot: Fix Search Term 2024-11-18 16:45:48 +00:00
bin listusb: decode color format descriptors in usb_video devices 2024-11-18 16:44:46 +00:00
build Libpackage: Add HOST_LIBSUPC++ to libpackage and solver 2024-08-07 20:17:44 +00:00
data input: fix KEY_power key code conflict with japanese \_ key 2024-08-19 16:00:25 +00:00
kits BTimeSource: Fix debugger message in RealTimeFor() 2024-11-18 11:54:43 +00:00
libs network: Aggregate statistics from the device, if any are provided. 2024-11-13 13:55:58 -05:00
preferences Screen: initialize fUserSelectedColorSpace 2024-11-10 19:52:34 +00:00
servers PadBlocker: Avoid blocking non-trackpad devices 2024-11-18 16:45:04 +00:00
system kernel/fs: Use a spinlock for the unused-vnodes lock. 2024-11-18 13:59:25 -05:00
tests kernel/libnetwork: add accept4() from POSIX.1/2024 2024-11-04 17:55:40 +00:00
tools block_cache: enable prefetching 2024-11-16 18:26:21 +00:00
Jamfile