* sMappingLock is now a mutex instead of a spinlock.

* The vm_translation_map is now correctly held in all of the vm_ mapping
  functions.
* Removed the old vm_daemons.c file - there is now a new vm_daemons.cpp
  which contains the beginnings of our new page daemon.
  So far, it's pretty static and not much tested. What it currently does
  is to rescan all pages in the system with a two-handed clock algorithm
  and push pages into the modified and inactive lists.
* These inactive pages aren't really stolen yet, even though their mappings
  are removed (ie. their next access will cause a page fault). This should
  slow down Haiku a bit more, great, huh? :-)
* The page daemon currently only runs on low memory situations, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22156 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-09-03 15:41:14 +00:00
parent d8badf6791
commit 87689e25ea
8 changed files with 265 additions and 291 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ status_t vm_create_vnode_cache(void *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);
int32 vm_test_map_activation(vm_page *page);
int32 vm_test_map_activation(vm_page *page, bool *_modified);
void vm_clear_map_activation(vm_page *page);
void vm_remove_all_page_mappings(vm_page *page);
status_t vm_unmap_pages(vm_area *area, addr_t base, size_t length);
+2 -5
View File
@@ -44,15 +44,12 @@ extern "C" {
#endif
// Should only be used by vm internals
status_t vm_page_fault(addr_t address, addr_t faultAddress, bool isWrite, bool isUser, addr_t *newip);
status_t vm_page_fault(addr_t address, addr_t faultAddress, bool isWrite,
bool isUser, addr_t *newip);
void vm_unreserve_memory(size_t bytes);
status_t vm_try_reserve_memory(size_t bytes);
status_t vm_daemon_init(void);
// used by the page daemon to walk the list of address spaces
void vm_address_space_walk_start(struct hash_iterator *i);
vm_address_space *vm_address_space_walk_next(struct hash_iterator *i);
#ifdef __cplusplus
}
#endif