Re: [patch 3/3 take2] smaps: add clear_refs file to clear reference

2007-02-06 Thread Andrew Morton
On Tue, 6 Feb 2007 22:15:59 -0800 (PST) David Rientjes <[EMAIL PROTECTED]> wrote: > +static void clear_refs_pte_func(struct pte_walker *walker, pte_t *pte, > + unsigned long addr) > +{ > + struct page *page; > + pte_t ptent; > + > + ptent = *pte; > + if

[patch 3/3 take2] smaps: add clear_refs file to clear reference

2007-02-06 Thread David Rientjes
Adds an additional file to /proc/pid: clear_refs. When any non-zero number is written to this file, all the PG_referenced flags and PAGE_ACCESSED (meaning the page has been accessed) are cleared within each VMA for the corresponding task. It is now possible to measure how much memory a task is us