diff options
author | jeff <jeff@FreeBSD.org> | 2003-10-05 02:48:04 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-10-05 02:48:04 +0000 |
commit | e15704d590a022640849657ff004d6a6c4ad8fb6 (patch) | |
tree | be5efb4f481aa446fcd2f39753b0abcee047a3a4 /sys/kern/vfs_subr.c | |
parent | c38cbc38476c3fc30004457ae2cf0b5fee9e76e0 (diff) | |
download | FreeBSD-src-e15704d590a022640849657ff004d6a6c4ad8fb6.zip FreeBSD-src-e15704d590a022640849657ff004d6a6c4ad8fb6.tar.gz |
- Don't cache_purge() in getnewvnode. It's done in vclean(). With this
purge, the purge in vclean, and the filesystems purge, we had 3 purges
per vnode.
- Move the insmntque(vp, 0) to vclean() so that we may remove it from the
two vgone() functions and reduce the number of lock operations required.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 412a47c4..f5b3434 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -951,7 +951,6 @@ getnewvnode(tag, mp, vops, vpp) freevnodes--; mtx_unlock(&vnode_free_list_mtx); - cache_purge(vp); VI_LOCK(vp); vp->v_iflag |= VI_DOOMED; vp->v_iflag &= ~VI_FREE; @@ -2593,7 +2592,6 @@ vclean(vp, flags, td) } VI_UNLOCK(vp); } - /* * Reclaim the vnode. */ @@ -2619,7 +2617,11 @@ vclean(vp, flags, td) } VI_UNLOCK(vp); } - + /* + * Delete from old mount point vnode list. + */ + if (vp->v_mount != NULL) + insmntque(vp, (struct mount *)0); cache_purge(vp); VI_LOCK(vp); if (VSHOULDFREE(vp)) @@ -2726,9 +2728,6 @@ vgonechrl(struct vnode *vp, struct thread *td) ASSERT_VI_LOCKED(vp, "vgonechrl"); vx_lock(vp); vclean(vp, 0, td); - VI_UNLOCK(vp); - insmntque(vp, (struct mount *) 0); - VI_LOCK(vp); vp->v_op = spec_vnodeop_p; vx_unlock(vp); VI_UNLOCK(vp); @@ -2760,11 +2759,6 @@ vgonel(vp, td) VI_UNLOCK(vp); /* - * Delete from old mount point vnode list, if on one. - */ - if (vp->v_mount != NULL) - insmntque(vp, (struct mount *)0); - /* * If special device, remove it from special device alias list * if it is on one. */ |