Date: Fri, 4 Dec 2015 09:09:19 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291757 - stable/10/sys/kern Message-ID: <201512040909.tB499Juw048725@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Dec 4 09:09:19 2015 New Revision: 291757 URL: https://svnweb.freebsd.org/changeset/base/291757 Log: MFC r291379: Move the comment about resident pages preventing vnode from leaving active list, into the header comment for vdrop(). Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Fri Dec 4 09:08:39 2015 (r291756) +++ stable/10/sys/kern/vfs_subr.c Fri Dec 4 09:09:19 2015 (r291757) @@ -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 threa 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512040909.tB499Juw048725>