From 829f3028369d9e3178e0dfc3c0653d12724949fe Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Tue, 12 Jan 2010 01:22:09 +0000 Subject: [PATCH] Introduced vm_page::modified flag, which is used by vm_unmap_page[s]() to preserve the dirty flag of the mapping without having to potentially move the page to the modified queue. This lifts the (ignored) requirement that the pages to be unmapped must not be busy. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35023 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm_page.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/system/kernel/vm/vm_page.cpp b/src/system/kernel/vm/vm_page.cpp index b9e146cdf4..c85149aa30 100644 --- a/src/system/kernel/vm/vm_page.cpp +++ b/src/system/kernel/vm/vm_page.cpp @@ -413,6 +413,7 @@ dump_page(int argc, char **argv) kprintf("wired_count: %d\n", page->wired_count); kprintf("usage_count: %d\n", page->usage_count); kprintf("busy_writing: %d\n", page->busy_writing); + kprintf("modified: %d\n", page->modified); #if DEBUG_PAGE_QUEUE kprintf("queue: %p\n", page->queue); #endif @@ -2168,6 +2169,7 @@ vm_page_allocate_page(int pageState) int oldPageState = page->state; page->state = PAGE_STATE_BUSY; page->usage_count = 2; + page->modified = 0; locker.Unlock(); @@ -2204,6 +2206,7 @@ allocate_page_run(page_num_t start, page_num_t length, int pageState, page.state = PAGE_STATE_BUSY; page.usage_count = 1; + page.modified = 0; } freeClearQueueLocker.Unlock();