Re: [PATCH 0/13] maps: pagemap, kpagemap, and related cleanups

Andrew Morton
2007-04-13T17:58:16Z

On Fri, 13 Apr 2007 12:24:51 -0500 Matt Mackall <mpm@selenic.com> wrote:

> > > From /proc/kpagemap + /proc/*/pagemap, you can
> > > basically synthesize any statistic you want, including all the
> > > existing ones. For some data, /proc/pid/smaps (or /proc/meminfo) will
> > > be considerably more efficient.
> >
> > You'd need to poke clear_refs beforehand to make the referenced bits useful.
> >
> > Actually, we also need to run around the ptes and collect the pte-referenced
> > bits too. I don't think your code copes with any of that?
>
> No, and it probably should. Perhaps dirty as well, though I've kindof
> lost the plot on how that works lately.

Dirty is OK: the VM keeps pte-dirtiness and page-dirtiness in sync now.