Reset kvo_laundry to prevent it being cumulative

`sysctl vm.objects`, used by `vmstat -o` was not resetting the
laundry counter to 0 inside the loop, causing it to show the sum of
the laundry count for all previous objects instead of only the laundry
count for the current object.

Fixes:	a86373bc93
Reviewed by:	markj
Sponsored by:	Klara, Inc.
Sponsored by:	Modirum MDPay
Differential Revision:	https://reviews.freebsd.org/D50907
This commit is contained in:
Allan Jude 2025-06-25 13:38:50 +00:00
parent 3ef39f58e5
commit 32f9c9699a

View file

@ -2529,6 +2529,7 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only)
kvo->kvo_memattr = obj->memattr;
kvo->kvo_active = 0;
kvo->kvo_inactive = 0;
kvo->kvo_laundry = 0;
kvo->kvo_flags = 0;
if (!swap_only) {
vm_page_iter_init(&pages, obj);