diff options
author | 2008-06-14 03:48:32 +0000 | |
---|---|---|
committer | 2008-06-14 03:48:32 +0000 | |
commit | 025d2e76d055ecf66dcb553e7bcb3eb189c43dd6 (patch) | |
tree | 95012a2ceaafec0a7e391ba901bcb723e0764b37 /usr.bin/cvs/commit.c | |
parent | don't always re-open the same CVS/Entries file, instead keep the (diff) | |
download | wireguard-openbsd-025d2e76d055ecf66dcb553e7bcb3eb189c43dd6.tar.xz wireguard-openbsd-025d2e76d055ecf66dcb553e7bcb3eb189c43dd6.zip |
If we have one syscall that consumes large amounts of memory (like for
example an ioctl that loads bazillions of entries into a pf table) it
would exhaust the pool of free pages and not let uvm_km_thread catch
up until the pool was actually empty. This could be bad for non-sleeping
allocators since they can't wait for the memory while the big hog
can.
Instead of letting the syscall exhaust the pool, detect when we fall below
the low watermark, wake the thread, sleep once and let the thread
catch up. This paces the huge consumer so that the more critical consumers
never find an exhausted pool of pages.
"seems reasonable" kettenis@
Diffstat (limited to 'usr.bin/cvs/commit.c')
0 files changed, 0 insertions, 0 deletions