Ariane van der Steldt <ari...@stack.nl> writes: > Why are the pventries allocated from the kmem_map anyway? I think they > should be allocated using the uvm_km_getpage instead. Or even better, > from a pvpool like amd64.
Recursion. caller holds lock on kernel_map. getpage pool is empty, caller wakes up the getpage thread, goes to sleep (still holding the kernel_map lock), getpage thread wakes up, deadlocks on the kernel_map lock. It's not an easily detectable recursion either, so we don't panic when it happens, we just hang. amd64 can avoid it thanks to the direct map (no kernel_map involed when calling getpage). We could try some magic with allocating from a pool with NOWAIT and then fall back to kmem_map when that fails, but the logic would become hairy. Maybe a pool allocator with those semantics? //art