summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2012-08-07 04:48:14 +0000
committeralc <alc@FreeBSD.org>2012-08-07 04:48:14 +0000
commitcd8266338a7951e4af840a9bf6a731ee07ccd65c (patch)
treeab53138f6566fb9e64173e1290567aa40de4ae08 /sys/vm
parent98bad868d8621dcb2ba19ef39911f565fa2ffe8a (diff)
downloadFreeBSD-src-cd8266338a7951e4af840a9bf6a731ee07ccd65c.zip
FreeBSD-src-cd8266338a7951e4af840a9bf6a731ee07ccd65c.tar.gz
Never sleep on busy pages in vm_pageout_launder(), always skip them. Long
ago, sleeping on busy pages in vm_pageout_launder() made sense. The call to vm_pageout_flush() specified asynchronous I/O and sleeping on busy pages blocked vm_pageout_launder() until the flush had completed. However, in CVS revision 1.35 of vm/vm_contig.c, the call to vm_pageout_flush() was changed to request synchronous I/O, but the sleep on busy pages was not removed.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_pageout.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 3994ce1..6b1031f 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -586,23 +586,14 @@ vm_pageout_launder(int queue, int tries, vm_paddr_t low, vm_paddr_t high)
continue;
}
object = m->object;
- if (!VM_OBJECT_TRYLOCK(object) &&
+ if ((!VM_OBJECT_TRYLOCK(object) &&
(!vm_pageout_fallback_object_lock(m, &next) ||
- m->hold_count != 0)) {
+ m->hold_count != 0)) || (m->oflags & VPO_BUSY) != 0 ||
+ m->busy != 0) {
vm_page_unlock(m);
VM_OBJECT_UNLOCK(object);
continue;
}
- if ((m->oflags & VPO_BUSY) != 0 || m->busy != 0) {
- if (tries == 0) {
- vm_page_unlock(m);
- VM_OBJECT_UNLOCK(object);
- continue;
- }
- vm_page_sleep(m, "vpctw0");
- VM_OBJECT_UNLOCK(object);
- return (FALSE);
- }
vm_page_test_dirty(m);
if (m->dirty == 0)
pmap_remove_all(m);
OpenPOWER on IntegriCloud