Follow us on Google+ Follow us on Facebook Follow us on Twitter

Opened 5 years ago

Last modified 3 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: 0.7.1
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 (1)

comment:1 Changed 3 years ago by Jakub Jermář

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