summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-12-04 09:09:19 +0000
committerkib <kib@FreeBSD.org>2015-12-04 09:09:19 +0000
commitfb0b76eb8f86155cb811c2039085009d89da54d2 (patch)
tree66fa912f02c6ac38611b7758aa10b6b92813246d
parente6a699bf6061537d3d3d537f8f0f5b7882924bf6 (diff)
downloadFreeBSD-src-fb0b76eb8f86155cb811c2039085009d89da54d2.zip
FreeBSD-src-fb0b76eb8f86155cb811c2039085009d89da54d2.tar.gz
MFC r291379:
Move the comment about resident pages preventing vnode from leaving active list, into the header comment for vdrop().
-rw-r--r--sys/kern/vfs_subr.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index b5f5b42..2df1e25 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -2425,6 +2425,10 @@ vdrop(struct vnode *vp)
* Drop the hold count of the vnode. If this is the last reference to
* the vnode we place it on the free list unless it has been vgone'd
* (marked VI_DOOMED) in which case we will free it.
+ *
+ * Because the vnode vm object keeps a hold reference on the vnode if
+ * there is at least one resident non-cached page, the vnode cannot
+ * leave the active list without the page cleanup done.
*/
void
vdropl(struct vnode *vp)
@@ -2540,11 +2544,13 @@ vinactive(struct vnode *vp, struct thread *td)
VI_UNLOCK(vp);
/*
* Before moving off the active list, we must be sure that any
- * modified pages are on the vnode's dirty list since these will
- * no longer be checked once the vnode is on the inactive list.
- * Because the vnode vm object keeps a hold reference on the vnode
- * if there is at least one resident non-cached page, the vnode
- * cannot leave the active list without the page cleanup done.
+ * modified pages are converted into the vnode's dirty
+ * buffers, since these will no longer be checked once the
+ * vnode is on the inactive list.
+ *
+ * The write-out of the dirty pages is asynchronous. At the
+ * point that VOP_INACTIVE() is called, there could still be
+ * pending I/O and dirty pages in the object.
*/
obj = vp->v_object;
if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) {
OpenPOWER on IntegriCloud