Cleanup uvmpd_tune() & document global variable ownership.
authormpi <mpi@openbsd.org>
Sun, 24 Mar 2024 10:29:35 +0000 (10:29 +0000)
committermpi <mpi@openbsd.org>
Sun, 24 Mar 2024 10:29:35 +0000 (10:29 +0000)
commita853522ee0f410293bee9e51ac5973226255bb9c
tree49242d8a23587424c094f9f3d721269ffba71f41
parent4cc44c3251406197ccab709ce0dcf6f2ae72a409
Cleanup uvmpd_tune() & document global variable ownership.

- Stop calling uvmpd_tune() inside uvm_pageout().  OpenBSD currently doesn't
support adding RAM. `uvmexp.npages' is immutable after boot.

- Document that `uvmexp.freemin' and `uvmexp.freetarg' are immutable.

- Reduce the scope of the `uvm_pageq_lock' lock.  It serializes accesses
to `uvmexp.active' and `uvmexp.inactive'.

ok kettenis@
sys/uvm/uvm_pdaemon.c
sys/uvm/uvmexp.h