From 44e2fd093c9a2374c0326e48e386f4dcf4a19568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 26 Sep 2007 18:00:45 +0000 Subject: [PATCH] Actually, it's not a good idea to increase the usage_count, since every access is tracked while the page scanner runs much slower. Now, we just set it to a fixed positive, so that they can easily age in case they are actually unused. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22320 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/cache/file_cache.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/system/kernel/cache/file_cache.cpp b/src/system/kernel/cache/file_cache.cpp index aa072e2349..87b8a74ec4 100644 --- a/src/system/kernel/cache/file_cache.cpp +++ b/src/system/kernel/cache/file_cache.cpp @@ -955,10 +955,7 @@ cache_io(void *_cacheRef, off_t offset, addr_t buffer, size_t *_size, // Since we don't actually map pages as part of an area, we have // to manually maintain its usage_count - if (page->usage_count < 0) - page->usage_count = 1; - else - page->usage_count++; + page->usage_count = 2; // and copy the contents of the page already in memory if (doWrite) {