Opened 12 years ago

Last modified 6 years ago

#445 new enhancement

slab_reclaim() holds a spinlock when making calls to frame allocator

Reported by: Jakub Jermář Owned by: Jakub Jermář
Priority: major Milestone:
Component: helenos/kernel/generic Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

slab_reclaim() holds a spinlock when making calls to frame allocator. It is actually possible that multiple spinlocks are held along the call path from slab_reclaim() to frame_free().

This fact prevents the frame allocator from using normal MUTEX_PASSIVE variant of mutexes in favor of the weird MUTEX_ACTIVE variant of mutexes when waiting for physical memory.

The solution is either to drop all mutexes before delving into the frame allocator from slab_reclaim() and carefully reacquiring them after the return, or to modify functions called from slab_reclaim() to free memory to a local list which will be processed later on in slab_reclaim() after all spinlocks are released. The later is complicated by the fact that slab caches may have user-defined destructors, in which the user can call slab/frame_free() directly.

Change History (2)

comment:1 by Jakub Jermář, 10 years ago

Milestone: 0.5.10.7.1

comment:2 by Jakub Jermář, 6 years ago

Milestone: 0.7.1
Note: See TracTickets for help on using tickets.