Re: [PATCH] mm/filemap.c: unconditionally call mark_page_accessed

Valdis.Kletnieks
2007-03-15T17:39:44Z

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

On Wed, 14 Mar 2007 22:33:17 BST, Andreas Mohr said:

> it'd seem we need some kind of state management here to figure out good
> intervals of when to call mark_page_accessed() *again* for this page. E.g.
> despite non-changing access patterns you could still call mark_page_accessed(
)
> every 32 calls or so to avoid expiry, but this would need extra helper
> variables.

What if you did something like

if (jiffies%32) {...

(Possibly scaling it so the low-order bits change). No need to lock it, as
"right most of the time" is close enough.

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]