slab_reclaim() holds a spinlock when making calls to frame allocator
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
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.