summaryrefslogtreecommitdiff
path: root/vm/vm_page.h
diff options
context:
space:
mode:
authorSergio Lopez <slp@sinrega.org>2011-12-29 22:30:12 +0100
committerSergio Lopez <slp@sinrega.org>2011-12-29 22:30:12 +0100
commit666299d037be6ffa83345d6d281fa955431f55fe (patch)
treef63ff542ac6bbe6d6d99fa17348a5ca958685227 /vm/vm_page.h
parent6af53cb9d48013971ad5fa37de173c1bbf73292a (diff)
* include/mach/memory_object.h: Add MEMORY_OBJECT_COPY_VMPRIV to mark objects that can't be blocked even if dirty page limits has been exceeded.k0ro/advisory_pageout/master
* vm/memory_object.c (memory_object_data_supply): Mark pages provided by user as external. * (memory_object_lock_request): Lock page queues before cleaning holding pages. * (memory_object_set_attributes_common): Deal with MEMORY_OBJECT_COPY_VMPRIV. * vm/vm_fault.c (vm_fault_page): If the number of potentially dirty pages has reached a certain static number, either request a pageout or block the thread. * (vm_fault_page): Force an early request for a real page instead of a fictitious one. * vm/vm_object.h (struct vm_object): New flag vm_privileged that relates with MEMORY_OBJECT_COPY_PRIV. * vm/vm_object.c (vm_object_bootstrap): Initialize vm_privileged property as FALSE. * vm/vm_page.h: Add variables vm_page_too_dirty, vm_page_dirty_count and vm_page_external_target. * vm/vm_pageout.c: Adjust VM_PAGE_FREE_TARGET, VM_PAGE_FREE_MIN and VM_PAGE_EXTERNAL_LIMIT. Make vm_page_external_target signed. * (vm_pageout_setup): Write lock cleaned pages. Adjust dirty page counters. * (vm_pageout_scan): Try freeing clean external pages first. Disable broken old code. * vm/vm_resident.c: Add variables vm_page_too_dirty and vm_page_dirty_count. * (vm_page_convert.c): Propagate external argument to converted page. * (vm_page_grab): Don't use old external page limits. * (vm_page_grab_contiguous_pages): Likewise. * (vm_page_wait): Likewise. * (vm_page_release): Don't adjust external count. * (vm_page_free): Adjust external and external-dirty counters here. Wake up blocked threads.
Diffstat (limited to 'vm/vm_page.h')
-rw-r--r--vm/vm_page.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/vm/vm_page.h b/vm/vm_page.h
index f13b0af9..e50b8b62 100644
--- a/vm/vm_page.h
+++ b/vm/vm_page.h
@@ -183,6 +183,10 @@ extern
int vm_page_laundry_count; /* How many pages being laundered? */
extern
int vm_page_external_limit; /* Max number of pages for external objects */
+extern
+int vm_page_too_dirty; /* Pages on hold due to dirty limit */
+extern
+int vm_page_dirty_count; /* How many pages are (potentially) dirty? */
/* Only objects marked with the extcounted bit are included in this total.
Pages which we scan for possible pageout, but which are not actually
@@ -190,6 +194,8 @@ int vm_page_external_limit; /* Max number of pages for external objects */
in this way. */
extern
int vm_page_external_count; /* How many pages for external objects? */
+extern
+int vm_page_external_target;/* How many external pages do we want? */