LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Matt Mackall <mpm@selenic.com>
Cc: Paul Mundt <lethal@linux-sh.org>, 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 18:25:51 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702081816570.31521@chino.kir.corp.google.com> (raw)
In-Reply-To: <20070209020038.GN16722@waste.org>

On Thu, 8 Feb 2007, Matt Mackall wrote:

> 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.
> 

Yes, but only in a limited number of cases (including smaps).  It is not 
always sufficient to do it on the block-of-ptes level.  Many of the the 
pte iterators in the code right now are slightly different on each level: 
the ioremap code, for example, allocates the various directories as it 
progresses in depth.

To have one library pte iterator would only be possible with callback 
functions on each pgd, pud, and pmd level that (at least) ioremap would 
require to be implemented on top of.  That isn't very appealing.

The PTI patchset from July moved these iterators into .h files but did not 
implement a single pte iterator to build on.  It just turned out nicely in 
the smaps case that there was no difference on the pgd, pud, or pmd level 
between the two required iterators.  I added a void *private to carry the 
struct for statistics accumulating in the smaps case but this is worthless 
in the clear_refs case.

		David

  reply	other threads:[~2007-02-09  2:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-07  6:15 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
2007-02-09  2:25     ` David Rientjes [this message]
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=Pine.LNX.4.64.0702081816570.31521@chino.kir.corp.google.com \
    --to=rientjes@google.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=mpm@selenic.com \
    --subject='Re: [patch 1/3 take2] smaps: extract pte walker from smaps code' \
    /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).