svn commit: r303649 - user/alc/PQ_LAUNDRY/sys/vm
Alan Cox
alc at FreeBSD.org
Mon Aug 1 22:53:30 UTC 2016
Author: alc
Date: Mon Aug 1 22:53:28 2016
New Revision: 303649
URL: https://svnweb.freebsd.org/changeset/base/303649
Log:
Update a couple comments. In particular, explain why we dequeue the page
early in vm_pageout_scan().
Modified:
user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c
Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c
==============================================================================
--- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Aug 1 22:41:50 2016 (r303648)
+++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Aug 1 22:53:28 2016 (r303649)
@@ -948,9 +948,8 @@ vm_pageout_launder(struct vm_domain *vmd
}
/*
- * We unlock the laundry queue, invalidating the
- * 'next' pointer. Use our marker to remember our
- * place.
+ * Unlock the laundry queue, invalidating the 'next' pointer.
+ * Use a marker to remember our place in the laundry queue.
*/
TAILQ_INSERT_AFTER(&pq->pq_pl, m, &vmd->vmd_laundry_marker,
plinks.q);
@@ -1333,9 +1332,12 @@ unlock_page:
KASSERT(m->hold_count == 0, ("Held page %p", m));
/*
- * We unlock the inactive page queue, invalidating the
- * 'next' pointer. Use our marker to remember our
- * place.
+ * Dequeue the inactive page and unlock the inactive page
+ * queue, invalidating the 'next' pointer. Dequeueing the
+ * page here avoids a later reacquisition (and release) of
+ * the inactive page queue lock when vm_page_activate(),
+ * vm_page_free(), or vm_page_launder() is called. Use a
+ * marker to remember our place in the inactive queue.
*/
TAILQ_INSERT_AFTER(&pq->pq_pl, m, &vmd->vmd_marker, plinks.q);
vm_page_dequeue_locked(m);
More information about the svn-src-user
mailing list