diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2013-07-11 20:33:57 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2013-07-11 20:33:57 +0000 |
commit | 5a3c920f45a175d13e76cbd07ac0991ff0fc6d46 (patch) | |
tree | 24bf1de361168430e88fce61be48255c88638c79 /sys | |
parent | 95f82796a96c17c38abafaed866abd46a6778643 (diff) | |
download | src-5a3c920f45a175d13e76cbd07ac0991ff0fc6d46.tar.gz src-5a3c920f45a175d13e76cbd07ac0991ff0fc6d46.zip |
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
Notes
Notes:
svn path=/head/; revision=253221
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/swap_pager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index ec3644206114..319811ab7b04 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1855,7 +1855,8 @@ retry: 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); |