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:
parent
8e0f884c71
commit
44e2fd093c
5
src/system/kernel/cache/file_cache.cpp
vendored
5
src/system/kernel/cache/file_cache.cpp
vendored
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user