summaryrefslogtreecommitdiffstats
path: root/sys/dev/md/md.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-08-30 20:12:23 +0000
committerkib <kib@FreeBSD.org>2013-08-30 20:12:23 +0000
commit36259bf9a23d3108e0dea9e6ed15c10d82e62497 (patch)
tree9db21cb765eb0b956c6a42198ad7544694625c46 /sys/dev/md/md.c
parent6eb9415a25cd4946b587bff62cbb3a07a7c4a604 (diff)
downloadFreeBSD-src-36259bf9a23d3108e0dea9e6ed15c10d82e62497.zip
FreeBSD-src-36259bf9a23d3108e0dea9e6ed15c10d82e62497.tar.gz
Give the page allocations initiated by the swap-backed md(4) a higher
priority. If the write is requested by a system daemon, sleeping there would starve resources and cause deadlock. Reported and tested by: pho Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r--sys/dev/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index cad9765..f0d1aec 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -826,7 +826,7 @@ mdstart_swap(struct md_s *sc, struct bio *bp)
vm_object_pip_add(sc->object, 1);
for (i = bp->bio_offset / PAGE_SIZE; i <= lastp; i++) {
len = ((i == lastp) ? lastend : PAGE_SIZE) - offs;
- m = vm_page_grab(sc->object, i, VM_ALLOC_NORMAL);
+ m = vm_page_grab(sc->object, i, VM_ALLOC_SYSTEM);
if (bp->bio_cmd == BIO_READ) {
if (m->valid == VM_PAGE_BITS_ALL)
rv = VM_PAGER_OK;
OpenPOWER on IntegriCloud