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

From: Christoph Lameter <clameter_at_sgi.com>
Date: 2004-11-09 03:25:53
On Mon, 8 Nov 2004, Martin J. Bligh wrote:

> > Hmm.. What would you think about a pointer to a stats structure in mm,
> > which would only be allocated if stats are requested by /proc actions? The
> > struct would contain a timestamp which would insure that the stats are
> > only generated in certain intervals and not over and over again. This
> > would also make it possible to force a regeneration of the numbers.
> >
> > Maybe lots of other statistical values in mm_struct could then also be
> > removed?
>
> So basically it's the same thing except you're caching it. If you want
> stale old data, you can cache it in userspace, rather than hack the
> kernel ... personally, I think it's utterly pointless - if the user didn't
> want the data, then they wouldn't be requesting it.

Then we would need userspace caching daemon for /proc?

The caching makes sense since mutiple processes may be interested in the
same data and various views of the data exist (statm vs. status vs. cpu
node information f.e.)

Removing realtime statistics would remove lots of code from the vm.
Maintaining these counters requires locking which interferes with Nick's
and my attempts to parallelize the vm.

Also these counters may develop to be hot spots on a NUMA system. If the
statistics are updated once in a while by a vm scan running on a single
cpu then the issues arising with multiple cpu updating the same memory
locations are less severe.

Thus removing the realtime statistics may result in a
significant performance increase and may also lead to code that is easier
to be maintained since its shorter, simpler and may use less locking.
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Nov 8 11:28:02 2004

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