Opened 12 years ago
Last modified 7 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 , 10 years ago
Milestone: | 0.5.1 → 0.7.1 |
---|
comment:2 by , 7 years ago
Milestone: | 0.7.1 |
---|