* The "page_stats" command does now also print the longest contiguous runs of

free respective free and cached pages.
* Removed the unused vm_page_allocate_page_run_no_base().
* vm_page_allocate_page_run() (and allocate_page_run()):
  - Use vm_page_reserve_pages() instead of vm_page_try_reserve_pages(), i.e.
    wait until the reservation succeeds.
  - Now we iterates two times through the pages to find a suitable page run. In
    the first iteration it only looks for free/clear pages, in the second
    iteration it also considers cached pages. This increases the chance of the
    function to succeed, when a lot of caching is going on.
    This reduces the amount of memory required to use the IOCache when booting
    off the anyboot Live CD to around 160 MB in qemu. It also seems to work with
    128 MB, but the syslog indicates that some memory allocations fail, which
    is not exactly inspiring confidence.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36489 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2010-04-26 13:56:09 +00:00
parent 01becc3026
commit b1e06d23ce
2 changed files with 218 additions and 89 deletions
+1 -3
View File
@@ -60,9 +60,7 @@ bool vm_page_try_reserve_pages(vm_page_reservation* reservation, uint32 count,
struct vm_page *vm_page_allocate_page(vm_page_reservation* reservation,
uint32 flags);
struct vm_page *vm_page_allocate_page_run(uint32 flags, addr_t base,
addr_t length, int priority);
struct vm_page *vm_page_allocate_page_run_no_base(uint32 flags, addr_t count,
int priority);
size_t length, int priority);
struct vm_page *vm_page_at_index(int32 index);
struct vm_page *vm_lookup_page(addr_t pageNumber);
bool vm_page_is_dummy(struct vm_page *page);