NetBSD/common
chs 779666e6a0 radixtree: allocate memory with KM_NOSLEEP to prevent pagedaemon hangs
Revert the part of rev 1.32 (reapplying "Do away with separate pool_cache
for some kernel objects") that changed the memory allocation for radixtree
nodes from PR_NOWAIT to KM_SLEEP as part of changing from a pool to kmem.
uvm_pageinsert_tree() calls into the radixtree code while holding
the object's vmobjlock, but that same lock is taken by the pagedaemon
in the process of reclaiming pages, and if the pagedaemon happens to
choose the same object to reclaim from that uvm_pageinsert_tree()
is being called on, then these two threads will deadlock.
The previous code already handled memory allocation failures
in uvm_pageinsert_tree() so we can simply change it back to nosleep.

Fixes a hang reported by simonb@, and the fix was also tested by him.
2024-05-04 17:58:24 +00:00
..
dist/zlib Handle standalone code. 2022-10-15 23:21:34 +00:00
include fix various typos in comments. 2024-02-05 21:46:04 +00:00
lib radixtree: allocate memory with KM_NOSLEEP to prevent pagedaemon hangs 2024-05-04 17:58:24 +00:00