mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
vfs: don't kick vnlru if it is already running
Further shaves some lock trips.
This commit is contained in:
parent
b9c012a60b
commit
76f1153790
1 changed files with 4 additions and 2 deletions
|
|
@ -1557,9 +1557,11 @@ vnlru_kick_locked(void)
|
|||
}
|
||||
|
||||
static void
|
||||
vnlru_kick(void)
|
||||
vnlru_kick_cond(void)
|
||||
{
|
||||
|
||||
if (vnlruproc_sig)
|
||||
return;
|
||||
mtx_lock(&vnode_list_mtx);
|
||||
vnlru_kick_locked();
|
||||
mtx_unlock(&vnode_list_mtx);
|
||||
|
|
@ -1812,7 +1814,7 @@ alloc:
|
|||
mtx_assert(&vnode_list_mtx, MA_NOTOWNED);
|
||||
rnumvnodes = atomic_fetchadd_long(&numvnodes, 1) + 1;
|
||||
if (vnlru_under(rnumvnodes, vlowat))
|
||||
vnlru_kick();
|
||||
vnlru_kick_cond();
|
||||
return (uma_zalloc_smr(vnode_zone, M_WAITOK));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue