* Replaced the vm_page_allocate_page*() "pageState" parameter by a more

general "flags" parameter. It encodes the target state of the page -- so
  that the page isn't unnecessarily put in the wrong page queue first -- a
  flag whether the page should be cleared, and one to indicate whether the
  page should be marked busy.
* Added page state PAGE_STATE_CACHED. Not used yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35333 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2010-01-29 15:54:40 +00:00
parent 00d70bc148
commit e65c400299
9 changed files with 115 additions and 89 deletions
+3 -3
View File
@@ -49,10 +49,10 @@ void vm_page_unreserve_pages(uint32 count);
void vm_page_reserve_pages(uint32 count, int priority);
bool vm_page_try_reserve_pages(uint32 count, int priority);
struct vm_page *vm_page_allocate_page(int pageState);
struct vm_page *vm_page_allocate_page_run(int state, addr_t base,
struct vm_page *vm_page_allocate_page(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(int state, addr_t count,
struct vm_page *vm_page_allocate_page_run_no_base(uint32 flags, addr_t count,
int priority);
struct vm_page *vm_page_at_index(int32 index);
struct vm_page *vm_lookup_page(addr_t pageNumber);
+11 -1
View File
@@ -128,13 +128,23 @@ enum {
PAGE_STATE_ACTIVE = 0,
PAGE_STATE_INACTIVE,
PAGE_STATE_MODIFIED,
PAGE_STATE_CACHED,
PAGE_STATE_FREE,
PAGE_STATE_CLEAR,
PAGE_STATE_WIRED,
PAGE_STATE_UNUSED
PAGE_STATE_UNUSED,
PAGE_STATE_COUNT,
PAGE_STATE_FIRST_UNQUEUED = PAGE_STATE_WIRED
};
#define VM_PAGE_ALLOC_STATE 0x00000007
#define VM_PAGE_ALLOC_CLEAR 0x00000010
#define VM_PAGE_ALLOC_BUSY 0x00000020
#if DEBUG_PAGE_ACCESS
# include <thread.h>