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
This commit is contained in:
Axel Dörfler 2007-09-26 18:00:45 +00:00
parent 8e0f884c71
commit 44e2fd093c

View File

@ -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) {