Re: another approach to rss : sloppy rss

Robin Holt
2004-11-20T01:46:10Z

On Sat, Nov 20, 2004 at 12:24:17PM +1100, Nick Piggin wrote:
> Well, you still need to put those counters on seperate cachelines, so you
> still need to pad them out quite a lot. Then as they are shared, you _still_
> need to make them atomic, and they'll still be bouncing around too.
>
> Linus' idea of a per-thread 'pages_in - pages_out' counter may prove to be
> just the right solution though.

I can go with either solution. Not sure how many cpus we can group together
before the cacheline becomes so hot that we need to fan them out. I have
a gut feeling it is alot.

On the 2.4 kernel which SGI put together, we just changed rss to an
atomic and ensured it was in a seperate cacheline from the locks and
performance was more than adequate. I realize a lot has changed since
2.4, but the concepts are similar.

Just my 2 cents,
Robin