The branch stable/13 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=d53bd16721b57bf2cd41dfd1a1f1515aa4aa7f78
commit d53bd16721b57bf2cd41dfd1a1f1515aa4aa7f78 Author: Enji Cooper <[email protected]> AuthorDate: 2022-04-11 01:17:09 +0000 Commit: Enji Cooper <[email protected]> CommitDate: 2026-01-31 23:03:51 +0000 Fix OID format for `vm.swap_reserved` and `vm.swap_total` The correct OID format for CTLTYPE_U64 is `QU` (`uquad_t`), not `A` (text expressed via `char *`). This issue was noticed while doing an sysctl tree walk using a sysctl(9) consumer that relies on the OID format to intuit what the type should be for a given sysctl. MFC after: 1 month Sponsored by: DellEMC Isilon Differential Revision: https://reviews.freebsd.org/D34877 (cherry picked from commit 567378cc0796c12f5d4bac79e639e22adf42b12f) --- sys/vm/swap_pager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index a3e312af2ed9..1436875c7727 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -161,10 +161,10 @@ static SYSCTL_NODE(_vm_stats, OID_AUTO, swap, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "VM swap stats"); SYSCTL_PROC(_vm, OID_AUTO, swap_reserved, CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, - &swap_reserved, 0, sysctl_page_shift, "A", + &swap_reserved, 0, sysctl_page_shift, "QU", "Amount of swap storage needed to back all allocated anonymous memory."); SYSCTL_PROC(_vm, OID_AUTO, swap_total, CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, - &swap_total, 0, sysctl_page_shift, "A", + &swap_total, 0, sysctl_page_shift, "QU", "Total amount of available swap storage."); int vm_overcommit __read_mostly = 0;
