Page MenuHomeFreeBSD

vm: stop taking proc lock in mmap to satisfy racct if it is disabled

Authored by mjg on Sep 17 2018, 10:24 PM.



Limits can be safely obtained with lim_cur from the thread. racct is compiled in but disabled by default. Note that racct enablement is a boot-only tunable.

This eliminates second most common place of taking the lock while pkg building.

Don't take the lock in mlockall either. This can be a separate commit.

There is one remaining lim_cur_proc place, but unfortunately it is being called from aio with the proc pointer. Can be fixed after 12 splits from head.

Test Plan

Booted debug kernel with and without racct compiled in/disabled.

Diff Detail

rS FreeBSD src repository - subversion
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.