lkml.org 
[lkml]   [2007]   [Feb]   [7]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 6 Feb 2007 22:33:36 -0800
FromAndrew Morton <>
SubjectRe: [patch 3/3 take2] smaps: add clear_refs file to clear reference
On Tue, 6 Feb 2007 22:15:59 -0800 (PST) David Rientjes <rientjes@google.com> 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 (!pte_present(ptent))
> +		return;
> +
> +	page = vm_normal_page(walker->vma, addr, ptent);
> +	if (!page)
> +		return;
> +	pte_mkold(ptent);

That only changed the local variable, and not the pagetable entry.

> +	ClearPageReferenced(page);
> +}

Please, do some good runtime testing.  Write a script to monitor the
overall working set, run it for some sample workloads (your X server or
mozilla would be good choices).  Share the results with us so we can marvel
at the efficiency of modern applications.  Include these examples in the
changelog.

Also, we will need to do tlb writeback and invalidation prior to this
operation.  Documentation/cachetlb.txt has details.
-
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/

\
 
 \ /
  Last update: 2007-02-07 07:37    [from the cache]
©2003-2008