bonefish+axeld:
* Removed the vm_cache/vm_store ref_count duality that besides being a bit ugly also created the page dameon cache retrieval problem: now, only areas (and cache consumers) retrieve a reference to the store (and therefore, the vnode). The page daemon doesn't need to care about this at all anymore, and the pseudo references of the vm_cache could be removed again. * Rearranged deletion of vnodes such that its ID can be reused directly after fs_remove_vnode() has been called. * vm_page_allocate_page() no longer panics when it runs out of pages, but just waits for new pages to become available using the new sFreeCondition condition variable - to make sure this happens in an acceptable time frame, it'll trigger a run of the low memory handlers. * Implemented a page_thief() that steals inactive pages from caches and puts them into the free queue. It runs as a low memory handler. * The file cache now sets the usage count on the pages it inserts into the cache (needs some rework though, cache_io() doesn't do it yet). * Instead of panicking, the kernel will currently dead lock in low memory situations, since BFS does a bit too much in bfs_release_vnode(). * Some minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22315 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -47,7 +47,7 @@ extern void cache_prefetch(dev_t mountID, ino_t vnodeID, off_t offset, size_t si
|
||||
extern status_t file_cache_init_post_boot_device(void);
|
||||
extern status_t file_cache_init(void);
|
||||
|
||||
extern vm_store *vm_create_vnode_store(void *vnode);
|
||||
extern vm_store *vm_create_vnode_store(struct vnode *vnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ struct vm_cache;
|
||||
struct file_descriptor;
|
||||
struct selectsync;
|
||||
struct pollfd;
|
||||
struct vnode;
|
||||
|
||||
|
||||
/** The I/O context of a process/team, holds the fd array among others */
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
struct kernel_args;
|
||||
struct team;
|
||||
struct vnode;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -65,7 +66,7 @@ area_id vm_clone_area(team_id team, const char *name, void **address,
|
||||
uint32 addressSpec, uint32 protection, uint32 mapping,
|
||||
area_id sourceArea);
|
||||
status_t vm_delete_area(team_id aid, area_id id);
|
||||
status_t vm_create_vnode_cache(void *vnode, vm_cache **_cache);
|
||||
status_t vm_create_vnode_cache(struct vnode *vnode, vm_cache **_cache);
|
||||
vm_area *vm_area_lookup(vm_address_space *addressSpace, addr_t address);
|
||||
status_t vm_set_area_memory_type(area_id id, addr_t physicalBase, uint32 type);
|
||||
status_t vm_get_page_mapping(team_id team, addr_t vaddr, addr_t *paddr);
|
||||
|
||||
Reference in New Issue
Block a user