svn commit: r307750 - user/alc/PQ_LAUNDRY/sys/vm
Mark Johnston
markj at FreeBSD.org
Fri Oct 21 19:40:39 UTC 2016
Author: markj
Date: Fri Oct 21 19:40:37 2016
New Revision: 307750
URL: https://svnweb.freebsd.org/changeset/base/307750
Log:
Have madvise(MADV_DONTNEED) move dirty pages to the laundry queue.
Previously we would always requeue such pages at the tail of the inactive
queue, which would further delay reclamation of a page already in the
laundry queue.
Discussed with: alc
Modified:
user/alc/PQ_LAUNDRY/sys/vm/vm_page.c
Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_page.c
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/vm/vm_page.c Fri Oct 21 19:23:51 2016 (r307749)
+++ user/alc/PQ_LAUNDRY/sys/vm/vm_page.c Fri Oct 21 19:40:37 2016 (r307750)
@@ -3310,11 +3310,13 @@ vm_page_advise(vm_page_t m, int advice)
/*
* Place clean pages near the head of the inactive queue rather than
* the tail, thus defeating the queue's LRU operation and ensuring that
- * the page will be reused quickly. Dirty pages are given a chance to
- * cycle once through the inactive queue before becoming eligible for
- * laundering.
+ * the page will be reused quickly. Dirty pages not already in the
+ * laundry are moved there.
*/
- _vm_page_deactivate(m, m->dirty == 0);
+ if (m->dirty == 0)
+ _vm_page_deactivate(m, TRUE);
+ else
+ vm_page_launder(m);
}
/*
More information about the svn-src-user
mailing list