Rik van Riel wrote: > On Thu, 29 Apr 2004, Nick Piggin wrote: > > >>I'm not very impressed with the pagecache use-once logic, and I >>have a patch to remove it completely and treat non-mapped touches >>(IMO) more sanely. > > > The basic idea of use-once isn't bad (search for LIRS and > ARC page replacement), however the Linux implementation > doesn't have any of the checks and balances that the > researched replacement algorithms have... > > However, adding the checks and balancing required for LIRS, > ARC and CAR(S) isn't easy since it requires keeping track of > a number of recently evicted pages. That could be quite a > bit of infrastructure, though it might be well worth it. > No, use once logic is good in theory I think. Unfortunately our implementation is quite fragile IMO (although it seems to have been "good enough"). This is what I'm currently doing (on top of a couple of other patches, but you get the idea). I should be able to transform it into a proper use-once logic if I pick up Nikita's inactive list second chance bit.