LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
Cc: Hugh Dickins <hugh@veritas.com>, Paul Mundt <lethal@linux-sh.org>,
	Christoph Lameter <clameter@sgi.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 3/3 take2] smaps: add clear_refs file to clear reference
Date: Tue, 6 Feb 2007 22:33:36 -0800	[thread overview]
Message-ID: <20070206223336.74595ecc.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0702062214400.13931@chino.kir.corp.google.com>

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.

  reply	other threads:[~2007-02-07  6:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07  6:15 [patch 1/3 take2] smaps: extract pte walker from smaps code David Rientjes
2007-02-07  6:15 ` [patch 2/3 take2] smaps: add pages referenced count to smaps David Rientjes
2007-02-07  6:15   ` [patch 3/3 take2] smaps: add clear_refs file to clear reference David Rientjes
2007-02-07  6:33     ` Andrew Morton [this message]
2007-02-07  6:29 ` [patch 1/3 take2] smaps: extract pte walker from smaps code Paul Mundt
2007-02-07  6:49   ` Andrew Morton
2007-02-07  7:24     ` Paul Mundt
2007-02-09  2:00   ` Matt Mackall
2007-02-09  2:25     ` David Rientjes
2007-02-07  8:30 ` Christoph Lameter
2007-02-07  9:35   ` David Rientjes
2007-02-09 16:15   ` Matt Mackall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070206223336.74595ecc.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=hugh@veritas.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    --subject='Re: [patch 3/3 take2] smaps: add clear_refs file to clear reference' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).