From: Matt Mackall <mpm@selenic.com>
To: Paul Mundt <lethal@linux-sh.org>,
David Rientjes <rientjes@google.com>,
Andrew Morton <akpm@osdl.org>, Hugh Dickins <hugh@veritas.com>,
Christoph Lameter <clameter@sgi.com>,
linux-kernel@vger.kernel.org
Subject: Re: [patch 1/3 take2] smaps: extract pte walker from smaps code
Date: Thu, 8 Feb 2007 20:00:39 -0600 [thread overview]
Message-ID: <20070209020038.GN16722@waste.org> (raw)
In-Reply-To: <20070207062934.GA11967@linux-sh.org>
On Wed, Feb 07, 2007 at 03:29:34PM +0900, Paul Mundt wrote:
> On Tue, Feb 06, 2007 at 10:15:47PM -0800, David Rientjes wrote:
> > Extracts the page table entry walker from the smaps-specific code in
> > fs/proc/task_mmu.c. This will be used later for clearing the reference
> > bits on pages to measure the number of pages accessed over a time period
> > through /proc/pid/smaps.
> >
> I like the general idea of this patch set, however..
>
> > Since the PTE walker is now extracted from the smaps code,
> > smaps_pte_func() is invoked for each PTE in the VMA. Its behavior is
> > identical to the existing implementation, except it is slightly slower
> > because each PTE now invokes a function call.
> >
> Perhaps this is something that needs to be looked at more closely and
> made more generic? There are many ranged page table walkers that aren't
> so performance critical that the function call cost would cause too much
> pain. ioremap_page_range() comes to mind, and there's bound to be others.
> This would also help people to get the pte map/unmap right, which seems
> to pop up from time to time as well..
I've been looking at a similar refactoring of other code and I think
the way to go is a callback per block-of-PTEs with start and end
pointers. That gets rid of most of the call indirection overhead.
--
Mathematics is the supreme nostalgia of our time.
next prev parent reply other threads:[~2007-02-09 2:13 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
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 [this message]
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=20070209020038.GN16722@waste.org \
--to=mpm@selenic.com \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=hugh@veritas.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@google.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox