7f64b301b1
* Replace ports list mutex with R/W-lock. * Move team port list protection to separate array of mutexes. Relieve contention on sPortsLock by removing Team::port_list from its protected items. With this, set_port_owner() only needs to acquire the sPortsLock for reading. * Add another hash table holding the ports by name. Used by find_port() so it doesn't have to iterate over the list anymore. * Use slab-based memory allocator for port messages. sPortQuotaLock was acquired on every message send or receive and was thus another point of contention. The lock is not necessary anymore. * Lock for port hashes and Port::lock are no longer locked in a nested fashion to reduce chances of blocking other threads. * Make operations concurrency-safe by adding an atomically accessed Port::state which provides linearization points to port creation and deletion. Both operations are now divided into logical and physical parts, the logical part just updating the state and the physical part adding/remove it to/from the port hash and team port list. * set_port_owner() is the only remaining function which still locks Port::lock and one or two of sTeamListLock[] in a nested fashion. Since it needs to move the port from one team list to another and change Port::owner, there's no way around. * Ports are now reference counted to make accesses to already-deleted ports safe. * Should fix #8007. |
||
---|---|---|
.. | ||
app | ||
audio | ||
binary_compatibility | ||
bluetooth | ||
debug | ||
device | ||
drivers | ||
file_systems | ||
firewire | ||
fs_shell | ||
graphics | ||
index_server | ||
input | ||
interface | ||
kernel | ||
libroot | ||
locale | ||
media | ||
midi | ||
mount | ||
net | ||
notification | ||
package | ||
runtime_loader | ||
screen_saver | ||
shared | ||
storage | ||
support | ||
syslog_daemon | ||
system | ||
textencoding | ||
tracker | ||
usb_vision | ||
userlandfs | ||
virtio | ||
vmdk |