NetBSD/common/lib/libc
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
..
arch s/Westley/Wesley/ in a book reference (in comments). 2024-03-30 22:03:39 +00:00
atomic sprinkle unused. 2024-02-14 18:00:02 +00:00
cdb mark parameter as unused. 2017-01-10 23:06:06 +00:00
gen radixtree: allocate memory with KM_NOSLEEP to prevent pagedaemon hangs 2024-05-04 17:58:24 +00:00
gmon fix static unused issue until lint understands attributes better. 2024-02-23 13:32:28 +00:00
hash move local decls to headers 2024-01-20 14:55:02 +00:00
inet Avoid undefined behavior in an inet_addr.c 2018-07-26 00:20:41 +00:00
md Remove __P usage. 2012-03-20 16:21:41 +00:00
misc s/miltiple/multiple/ in comment. 2023-12-07 07:10:44 +00:00
net Lint seems to prefer that we cast via (void*) and not directly to 2012-03-21 20:02:56 +00:00
quad use explicit cast to pacify lint. 2012-12-07 15:41:02 +00:00
rpc get rid of caddr_t 2019-06-16 16:01:44 +00:00
stdlib PR/57828: Alejandro Colomar: Prioritize test for ERANGE before testing for 2024-01-20 16:13:39 +00:00
string Add __UNCONST 2024-01-20 14:55:11 +00:00
sys Fix bug, the computation of cpuset_nentries was incorrect, we must do +1 2019-05-11 11:53:55 +00:00
Makefile.inc Provide all the LSE operation fuctions. The use of LSE instructions is 2021-04-27 09:14:24 +00:00