DragonFly commits List (threaded) for 2013-06
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
git: kernel - Wakeup threads blocked in the VM page allocator more quickly
commit 77d1fb91cace7f1779195614024e920f1b70b275
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date: Wed Jun 26 23:40:29 2013 -0700
kernel - Wakeup threads blocked in the VM page allocator more quickly
Additional tuning to changes in the way the pageout daemon and VM system
wakes up threads blocked allocating normal VM pages. Previously the VM
system would wait for the vm_paging_target() to be reached before waking
up all waiters, and had code to try to wakeup individual threads past
the minimum.
This just didn't work very well on machines with lots of memory because
it could take quite a long time for the pageout daemon to actually reach
the vm_paging_target() (and VM load could prevent it from being reached at
all!). Many threads could wind up being blocked indefinitely waiting for
cache and/or free page counts to reach reasonable levels.
The solution is to give the kernel time to build up a smaller number
of free+cache pages beyond the minimum, enough to give all waiting threads
a fair shot at allocating at least one page, and then simply wakeup all
the waiters. This hysteresis is set smallish on purpose, defaulting to
a value of 16 in order to avoid holding threads blocked for excessive
periods of time.
Under heavy VM loads this creates an overlap between memory consumers and
the pageout daemon, allowing the pageout daemon to run continuously in
these situations.
* Add the vm.page_free_hysteresis sysctl, initialized to 16. This field
specifies a small number of pages past the minimum required for normal
system operation before the VM system will wakeup threads blocked in the
VM page allocator.
* Adjust tmpfs to force-free pages through the hysteresis value to reduce
degenerate block/wakeup situations under heavy VM loads.
Summary of changes:
sys/vfs/tmpfs/tmpfs_vnops.c | 2 +-
sys/vm/vm_page.c | 32 +++++++++++++++++++++++++++-----
sys/vm/vm_page2.h | 4 ++++
sys/vm/vm_pageout.c | 21 ++++++++++++++++-----
sys/vm/vm_pageout.h | 1 +
5 files changed, 49 insertions(+), 11 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/77d1fb91cace7f1779195614024e920f1b70b275
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]