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
This commit is contained in:
parent
c1316c8dd3
commit
b5975dbf4e
|
@ -366,6 +366,10 @@ vm_page_allocate_page(int state)
|
||||||
|
|
||||||
// no free page
|
// 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
|
// If the limit for allocated pages has been reached, we try to steal an
|
||||||
// unused page.
|
// unused page.
|
||||||
if (sPagePool.allocatedPages >= kMaxAllocatedPages
|
if (sPagePool.allocatedPages >= kMaxAllocatedPages
|
||||||
|
@ -431,6 +435,7 @@ vm_page_allocate_page(int state)
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // 0
|
||||||
|
|
||||||
// no page yet -- allocate a new one
|
// no page yet -- allocate a new one
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue