sysctl vm.objects: yield if hog

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D31163
This commit is contained in:
Konstantin Belousov 2021-05-08 01:13:29 +03:00
parent 7738118e9a
commit 350fc36b4c

View file

@ -2585,6 +2585,7 @@ vm_object_list_handler(struct sysctl_req *req, bool swap_only)
kvo->kvo_structsize = roundup(kvo->kvo_structsize,
sizeof(uint64_t));
error = SYSCTL_OUT(req, kvo, kvo->kvo_structsize);
maybe_yield();
mtx_lock(&vm_object_list_mtx);
if (error)
break;