haiku/headers/private/kernel
Julian Harnath 7f64b301b1 Reduce lock contention in kernel port subsystem.
* 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.
2013-10-26 16:10:03 +02:00
..
arch ARM: kernel: Make KDL more useful on ARM 2013-09-17 23:04:59 +02:00
boot bootloader: Add an arguments_count field to stage2_args 2013-10-15 22:15:03 +02:00
disk_device_manager * Added file_system_module_info::uninitialize() analogously to 2011-06-13 01:53:11 +00:00
fs Style cleanup. 2012-10-08 13:59:16 +02:00
platform OF: Make sure the of_region templatized struct is packed 2012-11-06 16:34:01 +01:00
posix
slab Add new operator that takes an ObjectCache* and allocation flags and 2011-11-02 21:12:09 +00:00
util IteratableSplayTree: Add FindClosest() 2013-10-08 21:03:49 +02:00
vm elf: restore correct region protection after relocation 2013-04-16 03:44:38 +02:00
AllocationTracking.h Move AllocationTrackingInfo into a header. This way it can be re-used outside 2011-11-04 18:03:34 +00:00
block_cache.h
boot_device.h
boot_item.h
boot_splash.h
commpage.h commpage: randomize position of commpage 2013-04-04 15:27:22 +02:00
condition_variable.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
console.h
cpu.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
debug_heap.h Add debug_calloc() to the debug_heap. 2012-07-01 06:37:25 +02:00
debug_paranoia.h
debug.h mmlr + bonefish: 2011-11-01 17:19:26 +00:00
debugger_keymaps.h
DPC.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
elf_priv.h Support ELF64 in the kernel. 2012-07-09 11:11:38 +01:00
elf.h Implemented user debugging support for x86_64. 2012-08-07 20:20:42 +01:00
file_cache.h
frame_buffer_console.h
generic_syscall.h
heap.h Allow replacing the object cache with the guarded heap. 2011-12-04 13:52:06 +01:00
int.h * Introduce {reserve|allocate|free}_io_interrupt_vectors() that can generically 2011-10-12 20:55:28 +00:00
kdevice_manager.h
kdriver_settings.h
kernel_c++_structs.h
kernel_daemon.h
kernel.h Improved safety for user memory accesses. 2012-08-02 09:32:33 +01:00
kimage.h
kmodule.h
kscheduler.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
ksignal.h commpage: randomize position of commpage 2013-04-04 15:27:22 +02:00
ksyscalls.h
ksystem_info.h
listeners.h
lock.h Added a recursive_lock_transfer() function. 2012-03-31 00:09:45 +02:00
low_resource_manager.h
messaging.h
MessagingServiceDefs.h
Notifications.h Rework DefaultNotificationService registration. 2013-04-22 18:42:21 -04:00
port.h Reduce lock contention in kernel port subsystem. 2013-10-26 16:10:03 +02:00
real_time_clock.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
safemode.h
scheduling_analysis.h
sem.h
smp.h Changed ICI data argument types from uint32 to addr_t. 2012-06-14 13:06:55 +01:00
syscall_restart.h
system_profiler.h
team.h * Added function team_init_exit_info_on_error() which initializes the team's 2011-06-14 13:04:31 +00:00
thread_types.h commpage: randomize position of commpage 2013-04-04 15:27:22 +02:00
thread.h Change instances of wether in comments to whether. No functional change intended. 2011-12-12 14:41:49 -05:00
timer.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
tracing.h bonefish+mmlr: 2011-11-02 16:02:07 +00:00
user_atomic.h
user_debugger.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
user_mutex.h
UserEvent.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
usergroup.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
UserTimer.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
vfs.h Merge branch 'master' into package-management 2013-05-05 15:03:26 +02:00
wait_for_objects.h