Author: bonefish Date: 2010-01-12 02:22:09 +0100 (Tue, 12 Jan 2010) New Revision: 35023 Changeset: http://dev.haiku-os.org/changeset/35023/haiku Modified: haiku/trunk/src/system/kernel/vm/vm_page.cpp Log: 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. Modified: haiku/trunk/src/system/kernel/vm/vm_page.cpp =================================================================== --- haiku/trunk/src/system/kernel/vm/vm_page.cpp 2010-01-11 22:21:33 UTC (rev 35022) +++ haiku/trunk/src/system/kernel/vm/vm_page.cpp 2010-01-12 01:22:09 UTC (rev 35023) @@ -413,6 +413,7 @@ 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 @@ int oldPageState = page->state; page->state = PAGE_STATE_BUSY; page->usage_count = 2; + page->modified = 0; locker.Unlock(); @@ -2204,6 +2206,7 @@ page.state = PAGE_STATE_BUSY; page.usage_count = 1; + page.modified = 0; } freeClearQueueLocker.Unlock();