When swap pager allocates metadata in the pagedaemon context, allow it
to drain the reserve. This was broken in r243040, causing deadlock. Note that VM_WAIT call in case of uma_zalloc() failure from pagedaemon would only wait for the v_pageout_free_min anyway. Reported and tested by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
b6487bb3f0
commit
ff1a2e73b1
@ -1855,7 +1855,8 @@ swp_pager_meta_build(vm_object_t object, vm_pindex_t pindex, daddr_t swapblk)
|
||||
if (swapblk == SWAPBLK_NONE)
|
||||
goto done;
|
||||
|
||||
swap = *pswap = uma_zalloc(swap_zone, M_NOWAIT);
|
||||
swap = *pswap = uma_zalloc(swap_zone, M_NOWAIT |
|
||||
(curproc == pageproc ? M_USE_RESERVE : 0));
|
||||
if (swap == NULL) {
|
||||
mtx_unlock(&swhash_mtx);
|
||||
VM_OBJECT_WUNLOCK(object);
|
||||
|
Loading…
Reference in New Issue
Block a user