The modified temporary page counter could go out of sync pretty easily.

This could cause the page writer to run endlessly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23309 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-01-09 14:56:50 +00:00
parent 527b14e9d5
commit 3d2595d16a

View File

@ -662,7 +662,8 @@ set_page_state_nolock(vm_page *page, int pageState)
if (pageState != PAGE_STATE_INACTIVE && page->cache != NULL)
panic("to be freed page %p has cache", page);
} else if (pageState == PAGE_STATE_MODIFIED && page->cache->temporary)
}
if (pageState == PAGE_STATE_MODIFIED && page->cache->temporary)
sModifiedTemporaryPages++;
else if (page->state == PAGE_STATE_MODIFIED && page->cache->temporary)
sModifiedTemporaryPages--;
@ -682,6 +683,9 @@ set_page_state_nolock(vm_page *page, int pageState)
}
/*! Moves a modified page into either the active or inactive page queue
depending on its usage count and wiring.
*/
static void
move_page_to_active_or_inactive_queue(vm_page *page, bool dequeued)
{