MFC r201134:
Add a knob to allow reclaim of the directory vnodes that are source of the namecache records.
This commit is contained in:
parent
35e0c29fdf
commit
e6b37c3a7f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=201338
@ -152,6 +152,10 @@ SYSCTL_LONG(_vfs, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, "");
|
||||
static u_long freevnodes;
|
||||
SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "");
|
||||
|
||||
static int vlru_allow_cache_src;
|
||||
SYSCTL_INT(_vfs, OID_AUTO, vlru_allow_cache_src, CTLFLAG_RW,
|
||||
&vlru_allow_cache_src, 0, "Allow vlru to reclaim source vnode");
|
||||
|
||||
/*
|
||||
* Various variables used for debugging the new implementation of
|
||||
* reassignbuf().
|
||||
@ -643,7 +647,9 @@ vlrureclaim(struct mount *mp)
|
||||
* If it's been deconstructed already, it's still
|
||||
* referenced, or it exceeds the trigger, skip it.
|
||||
*/
|
||||
if (vp->v_usecount || !LIST_EMPTY(&(vp)->v_cache_src) ||
|
||||
if (vp->v_usecount ||
|
||||
(!vlru_allow_cache_src &&
|
||||
!LIST_EMPTY(&(vp)->v_cache_src)) ||
|
||||
(vp->v_iflag & VI_DOOMED) != 0 || (vp->v_object != NULL &&
|
||||
vp->v_object->resident_page_count > trigger)) {
|
||||
VI_UNLOCK(vp);
|
||||
@ -668,7 +674,9 @@ vlrureclaim(struct mount *mp)
|
||||
* interlock, the other thread will be unable to drop the
|
||||
* vnode lock before our VOP_LOCK() call fails.
|
||||
*/
|
||||
if (vp->v_usecount || !LIST_EMPTY(&(vp)->v_cache_src) ||
|
||||
if (vp->v_usecount ||
|
||||
(!vlru_allow_cache_src &&
|
||||
!LIST_EMPTY(&(vp)->v_cache_src)) ||
|
||||
(vp->v_object != NULL &&
|
||||
vp->v_object->resident_page_count > trigger)) {
|
||||
VOP_UNLOCK(vp, LK_INTERLOCK);
|
||||
|
Loading…
Reference in New Issue
Block a user