mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
vfs: use vnlru_read_freevnodes for the freevnodes sysctl
For a more accurate result.
This commit is contained in:
parent
ba5dc166e0
commit
03bfee1752
1 changed files with 13 additions and 2 deletions
|
|
@ -184,8 +184,6 @@ static struct vnode *vnode_list_reclaim_marker;
|
|||
*/
|
||||
static long wantfreevnodes;
|
||||
static long __exclusive_cache_line freevnodes;
|
||||
SYSCTL_ULONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD,
|
||||
&freevnodes, 0, "Number of \"free\" vnodes");
|
||||
static long freevnodes_old;
|
||||
|
||||
static counter_u64_t recycles_count;
|
||||
|
|
@ -350,6 +348,19 @@ SYSCTL_PROC(_kern, KERN_MAXVNODES, maxvnodes,
|
|||
CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RW, NULL, 0, sysctl_maxvnodes,
|
||||
"LU", "Target for maximum number of vnodes");
|
||||
|
||||
static int
|
||||
sysctl_freevnodes(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
u_long rfreevnodes;
|
||||
|
||||
rfreevnodes = vnlru_read_freevnodes();
|
||||
return (sysctl_handle_long(oidp, &rfreevnodes, 0, req));
|
||||
}
|
||||
|
||||
SYSCTL_PROC(_vfs, OID_AUTO, freevnodes,
|
||||
CTLTYPE_ULONG | CTLFLAG_MPSAFE | CTLFLAG_RD, NULL, 0, sysctl_freevnodes,
|
||||
"LU", "Number of \"free\" vnodes");
|
||||
|
||||
static int
|
||||
sysctl_wantfreevnodes(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue