diff options
author | Richard Braun <rbraun@sceen.net> | 2013-10-09 11:51:54 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2013-10-09 11:51:54 +0200 |
commit | 98d64d1a78172b1efc26cac36a367eec8496926f (patch) | |
tree | 6a6837406ad1ec12cc724c18a3d30293b41765c0 /vm/vm_pageout.c | |
parent | 54357e27b6f3f727357b6ae93808cc5da41291a2 (diff) | |
download | gnumach-98d64d1a78172b1efc26cac36a367eec8496926f.tar.gz gnumach-98d64d1a78172b1efc26cac36a367eec8496926f.tar.bz2 gnumach-98d64d1a78172b1efc26cac36a367eec8496926f.zip |
VM cache policy change
This patch lets the kernel unconditionnally cache non empty unreferenced
objects instead of using a fixed arbitrary limit. As the pageout daemon
evicts pages, it collects cached objects that have become empty. The
effective result is a graceful adjustment of the number of objects
related to memory management (virtual memory objects, their associated
ports, and potentially objects maintained in the external memory
managers). Physical memory can now be almost entirely filled up with
cached pages. In addition, these cached pages are not automatically
deactivated as objects can quickly be referenced again.
There are problems with this patch however. The first is that, on
machines with a large amount of physical memory (above 1 GiB but it also
depends on usage patterns), scalability issues are exposed. For example,
file systems which don't throttle their writeback requests can create
thread storms, strongly reducing system responsiveness. Other issues
such as linear scans of memory objects also add visible CPU overhead.
The second is that, as most memory is used, it increases the chances of
swapping deadlocks. Applications that map large objects and quickly
cause lots of page faults can still easily bring the system to its
knees.
Diffstat (limited to 'vm/vm_pageout.c')
-rw-r--r-- | vm/vm_pageout.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vm/vm_pageout.c b/vm/vm_pageout.c index 661675f0..eb75b975 100644 --- a/vm/vm_pageout.c +++ b/vm/vm_pageout.c @@ -750,7 +750,12 @@ void vm_pageout_scan() reclaim_page: vm_page_free(m); vm_page_unlock_queues(); - vm_object_unlock(object); + + if (vm_object_collectable(object)) + vm_object_collect(object); + else + vm_object_unlock(object); + continue; } |