If there are more than 4 MB dirty cache pages, the page writer won't stop anymore

writing back pages when there is enough free memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23086 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-12-08 20:32:04 +00:00
parent 2c0729ea2d
commit 9abdc42489
1 changed files with 1 additions and 2 deletions

View File

@ -902,8 +902,7 @@ page_writer(void* /*unused*/)
marker.state = PAGE_STATE_UNUSED; marker.state = PAGE_STATE_UNUSED;
while (true) { while (true) {
if (sModifiedPageQueue.count - sModifiedTemporaryPages < 1024 if (sModifiedPageQueue.count - sModifiedTemporaryPages < 1024) {
|| free_page_queue_count() > 1024) {
int32 count = 0; int32 count = 0;
get_sem_count(sWriterWaitSem, &count); get_sem_count(sWriterWaitSem, &count);
if (count == 0) if (count == 0)