* vm_copy_on_write_area() did not always correctly divide the ref_count of the
two cache_refs - it needs to count the consumers of the lower cache to find its actual number of references; the upper cache could still be in use by someone else. * There were several locking bugs in the VM code; since cache_ref::cache can change, we must not access it without having the cache_ref locked. * As a result, map_backing_store() now requires you to have the lock of the store's cache_ref held. * And therefore, some functions in vm_cache.c must no longer lock the cache_ref on their own, but require the caller to have it locked already. * Added the -s option to the cache/cache_ref KDL commands: it will only print the requested structure, and not its counterpart (useful if accessing one structure results in a page fault, as was possible previously). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19796 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2006, Axel Dörfler, [email protected].
|
||||
* Copyright 2003-2007, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
@@ -28,11 +28,11 @@ vm_page *vm_cache_lookup_page(vm_cache_ref *cacheRef, off_t page);
|
||||
void vm_cache_insert_page(vm_cache_ref *cacheRef, vm_page *page, off_t offset);
|
||||
void vm_cache_remove_page(vm_cache_ref *cacheRef, vm_page *page);
|
||||
void vm_cache_remove_consumer(vm_cache_ref *cacheRef, vm_cache *consumer);
|
||||
void vm_cache_add_consumer(vm_cache_ref *cacheRef, vm_cache *consumer);
|
||||
void vm_cache_add_consumer_locked(vm_cache_ref *cacheRef, vm_cache *consumer);
|
||||
status_t vm_cache_write_modified(vm_cache_ref *ref, bool fsReenter);
|
||||
status_t vm_cache_set_minimal_commitment(vm_cache_ref *ref, off_t commitment);
|
||||
status_t vm_cache_set_minimal_commitment_locked(vm_cache_ref *ref, off_t commitment);
|
||||
status_t vm_cache_resize(vm_cache_ref *cacheRef, off_t newSize);
|
||||
status_t vm_cache_insert_area(vm_cache_ref *cacheRef, vm_area *area);
|
||||
status_t vm_cache_insert_area_locked(vm_cache_ref *cacheRef, vm_area *area);
|
||||
status_t vm_cache_remove_area(vm_cache_ref *cacheRef, vm_area *area);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user