diff options
author | Sergio Lopez <slp@sinrega.org> | 2011-12-29 22:30:12 +0100 |
---|---|---|
committer | Sergio Lopez <slp@sinrega.org> | 2011-12-29 22:30:12 +0100 |
commit | 666299d037be6ffa83345d6d281fa955431f55fe (patch) | |
tree | f63ff542ac6bbe6d6d99fa17348a5ca958685227 /vm/vm_object.h | |
parent | 6af53cb9d48013971ad5fa37de173c1bbf73292a (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_object.h')
-rw-r--r-- | vm/vm_object.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vm/vm_object.h b/vm/vm_object.h index c9925709..d912b70e 100644 --- a/vm/vm_object.h +++ b/vm/vm_object.h @@ -148,7 +148,9 @@ struct vm_object { */ /* boolean_t */ use_shared_copy : 1,/* Use shared (i.e., * delayed) copy on write */ - /* boolean_t */ shadowed: 1; /* Shadow may exist */ + /* boolean_t */ shadowed: 1, /* Shadow may exist */ + /* boolean_t */ vm_privileged: 1; /* Object is allowed to exceed + dirty pages limit */ queue_chain_t cached_list; /* Attachment point for the list * of objects cached as a result |