summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_pageout.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 76920a0..73ef06d 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -294,8 +294,8 @@ more:
vm_page_test_dirty(p);
if ((p->dirty & p->valid) == 0 ||
p->queue != PQ_INACTIVE ||
- p->wire_count != 0 ||
- p->hold_count != 0) {
+ p->wire_count != 0 || /* may be held by buf cache */
+ p->hold_count != 0) { /* may be undergoing I/O */
ib = 0;
break;
}
@@ -323,8 +323,8 @@ more:
vm_page_test_dirty(p);
if ((p->dirty & p->valid) == 0 ||
p->queue != PQ_INACTIVE ||
- p->wire_count != 0 ||
- p->hold_count != 0) {
+ p->wire_count != 0 || /* may be held by buf cache */
+ p->hold_count != 0) { /* may be undergoing I/O */
break;
}
mc[page_base + pageout_count] = p;
@@ -714,6 +714,9 @@ rescan0:
if (m->flags & PG_MARKER)
continue;
+ /*
+ * A held page may be undergoing I/O, so skip it.
+ */
if (m->hold_count) {
vm_pageq_requeue(m);
addl_page_shortage++;
@@ -904,7 +907,8 @@ rescan0:
}
/*
- * If the page has become held, then skip it
+ * If the page has become held it might
+ * be undergoing I/O, so skip it
*/
if (m->hold_count) {
vm_pageq_requeue(m);
OpenPOWER on IntegriCloud