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:
@@ -662,7 +662,8 @@ set_page_state_nolock(vm_page *page, int pageState)
|
|||||||
|
|
||||||
if (pageState != PAGE_STATE_INACTIVE && page->cache != NULL)
|
if (pageState != PAGE_STATE_INACTIVE && page->cache != NULL)
|
||||||
panic("to be freed page %p has cache", page);
|
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++;
|
sModifiedTemporaryPages++;
|
||||||
else if (page->state == PAGE_STATE_MODIFIED && page->cache->temporary)
|
else if (page->state == PAGE_STATE_MODIFIED && page->cache->temporary)
|
||||||
sModifiedTemporaryPages--;
|
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
|
static void
|
||||||
move_page_to_active_or_inactive_queue(vm_page *page, bool dequeued)
|
move_page_to_active_or_inactive_queue(vm_page *page, bool dequeued)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user