Say, when a page is created due to a page fault, page->age is set to
zero instead of whatever it is now. Then, on the first access, it is
incremented to one. All accesses where page->age was previously zero
cause it to be incremented to one, and subsequent accesses where
page->age is non-zero cause a doubling rather than an increment.
This gives a nice heavy priority boost to frequently-accessed pages...
>Note that we don't actually use a LRU queue, we use a more efficient
>approximation called aging, so the above is not a recipe for implementation.
Maybe it is, but in a slightly lateral manner as above.
-- -------------------------------------------------------------- from: Jonathan "Chromatix" Morton mail: chromi@cyberspace.org (not for attachments) website: http://www.chromatix.uklinux.net/vnc/ geekcode: GCS$/E dpu(!) s:- a20 C+++ UL++ P L+++ E W+ N- o? K? w--- O-- M++$ V? PS PE- Y+ PGP++ t- 5- X- R !tv b++ DI+++ D G e+ h+ r++ y+(*) tagline: The key to knowledge is not to rely on people to teach you it. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/