Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Mar 2024 21:48:07 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Konstantin Belousov <kib@freebsd.org>, seigo.tanimura@gmail.com, dev-commits-src-main@freebsd.org
Subject:   Re: git: c849eb8f1925 - main - nullfs: Add the vfs.nullfs.cache_nodes sysctl to control nocache default [unknown oid 'vfs.nullfs.cache_vnodes']
Message-ID:  <35A8FCDD-7571-42C3-AAAC-81AAD6FC4D7B@yahoo.com>
In-Reply-To: <2A0B7932-0705-4227-9CE0-9A018752DAB0@yahoo.com>
References:  <2A0B7932-0705-4227-9CE0-9A018752DAB0@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[Correcting a typo in the naming. Leads to discovering need to load =
nullfs.ko
first.]

On Mar 16, 2024, at 21:18, Mark Millard <marklmi@yahoo.com> wrote:

> Both an official PkgBase install and a personal build do not find the =
new oid for this for main:
>=20
> # uname -apKU
> FreeBSD 7950X3D-ZFS 15.0-CURRENT FreeBSD 15.0-CURRENT =
main-n268827-75464941dc17 GENERIC-NODEBUG amd64 amd64 1500015 1500015
>=20
> # uname -apKU
> FreeBSD 7950X3D-ZFS 15.0-CURRENT FreeBSD 15.0-CURRENT #139 =
main-n268827-75464941dc17-dirty: Sun Mar 17 03:16:30 UTC 2024     =
root@7950X3D-ZFS:/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64=
.amd64/sys/GENERIC-NODBG amd64 amd64 1500015 1500015
>=20
> The results are:
>=20
> # sysctl -d vfs.nullfs.cache_nodes
> sysctl: unknown oid 'vfs.nullfs.cache_nodes'

# sysctl -d vfs.nullfs.cache_vnodes

would also have failed because nullfs.ko had not been
loaded yet.

> # sysctl -a | grep vnode
> kern.maxvnodes: 3224925
> kern.ipc.umtx_vnode_persistent: 0
> vm.vnode_pbufs: 2048
> vm.stats.vm.v_vnodepgsout: 0
> vm.stats.vm.v_vnodepgsin: 4923
> vm.stats.vm.v_vnodeout: 0
> vm.stats.vm.v_vnodein: 662
> vfs.wantfreevnodes: 806231
> vfs.freevnodes: 1323
> vfs.vnodes_created: 3654
> vfs.numvnodes: 1807
> vfs.vnode.vnlru.uma_reclaim_calls: 0
> vfs.vnode.vnlru.kicks: 0
> vfs.vnode.vnlru.max_free_per_call: 10000
> vfs.vnode.vnlru.failed_runs: 0
> vfs.vnode.vnlru.direct_recycles_free: 0
> vfs.vnode.vnlru.recycles_free: 0
> vfs.vnode.vnlru.recycles: 0
> vfs.vnode.stats.alloc_sleeps: 0
> vfs.vnode.stats.free: 1323
> vfs.vnode.stats.skipped_requeues: 0
> vfs.vnode.stats.created: 3654
> vfs.vnode.stats.count: 1807
> vfs.vnode.param.wantfree: 806231
> vfs.vnode.param.limit: 3224925
> vfs.cache.debug.vnodes_cel_3_failures: 0
> vfs.cache.stats.heldvnodes: 119
> debug.vnode_domainset: <NULL>
> debug.sizeof.vnode: 448
> debug.fail_point.status_fill_kinfo_vnode__random_path: off
> debug.fail_point.fill_kinfo_vnode__random_path: off

That also explains the above.

> Note: The mount_nullfs man page does have:
>=20
> QUOTE
>             cache    Force enable metadata caching.
>=20
>     The vfs.nullfs.cache_vnodes sysctl specifies global default for =
mount-
>     specific cache/nocache option.
> END QUOTE
>=20
> That is evidence of the vintage of materials.
>=20

After:

# kldload nullfs

It shows up (when correctly spelled):

# sysctl -Td vfs.nullfs.cache_vnodes
vfs.nullfs.cache_vnodes: cache free nullfs vnodes

(So the tunable requires first loading nullfs.ko to be
effective? Should there be any notes about getting
tunable time frame settings to work for any early
time frame use of nullfs_mount?)

# sysctl -Wd vfs.nullfs.cache_vnodes
vfs.nullfs.cache_vnodes: cache free nullfs vnodes

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35A8FCDD-7571-42C3-AAAC-81AAD6FC4D7B>