Re: removing mm->rss and mm->anon_rss from kernel?

From: Christoph Lameter <>
Date: 2004-11-07 03:19:55
On Sat, 6 Nov 2004, Martin J. Bligh wrote:

> > So I removed all uses of mm->rss and anon_rss from the kernel and
> > introduced a bean counter count_vm() that is only run when the
> > corresponding /proc file is used. count_vm then runs throught the vm
> > and counts all the page types. This could also add additional page types to our
> > statistics and solve some of the consistency issues.
> I would've thought SGI would be more worried about this kind of thing
> than anyone else ... what's going to happen when you type 'ps' on a large
> box, and it does this for 10,000 processes?

Yes but I think this is preferable because of the generally faster
operations of the vm without having to continually update statistics. And
these statistics seem to be quite difficult to properly generate (why else
introduce anon_rss). Without the counters other optimizations are easier
to do.

Doing a ps is not a frequent event. Of course this may cause
significant load if one does regularly access /proc entities then. Are
there any threads from the past with some numbers of what the impact was
when we calculated rss via proc?

> If you want to make it quicker, how about doing per-cpu stats, and totalling
> them at runtime, which'd be lockless, instead of all the atomic ops?

That has its own complications and would require lots of memory with
systems that already have up to 10k cpus.
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Sat Nov 6 11:21:11 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:32 EST