From b5975dbf4ef3a4cf73058fd0e5615fd4d993984b Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 1 Apr 2007 00:16:36 +0000 Subject: [PATCH] Disabled stealing an unused page from some cache. Unfortunately this introduced a locking problem, since vm_page_allocate_page() is invoked with a locked cache. I guess I have to rethink the design. :-/ git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20487 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../file_systems/userlandfs/server/haiku_file_cache.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/add-ons/kernel/file_systems/userlandfs/server/haiku_file_cache.cpp b/src/add-ons/kernel/file_systems/userlandfs/server/haiku_file_cache.cpp index 682c7eacf6..77333e3b84 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/server/haiku_file_cache.cpp +++ b/src/add-ons/kernel/file_systems/userlandfs/server/haiku_file_cache.cpp @@ -366,6 +366,10 @@ vm_page_allocate_page(int state) // no free page +#if 0 +// TODO: Nice idea in principle, but causes a serious locking problem. +// vm_page_allocate_page() is always invoked with some cached locked at the +// same time. Thus locking a cache here to steal a page can cause a deadlock. // If the limit for allocated pages has been reached, we try to steal an // unused page. if (sPagePool.allocatedPages >= kMaxAllocatedPages @@ -431,6 +435,7 @@ vm_page_allocate_page(int state) return page; } } +#endif // 0 // no page yet -- allocate a new one