From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Date: Sat, 20 Nov 2004 01:24:17 +0000 Subject: Re: another approach to rss : sloppy rss Message-Id: <419E9CC1.8060503@yahoo.com.au> List-Id: References: <419D47E6.8010409@yahoo.com.au> <419D4EC7.6020100@yahoo.com.au> <419D8C07.9040606@yahoo.com.au> <20041119195721.GA2203@lnx-holt.americas.sgi.com> In-Reply-To: <20041119195721.GA2203@lnx-holt.americas.sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Robin Holt Cc: Christoph Lameter , Hugh Dickins , Benjamin Herrenschmidt , linux-mm@kvack.org, linux-ia64@vger.kernel.org Robin Holt wrote: > On Fri, Nov 19, 2004 at 11:21:38AM -0800, Christoph Lameter wrote: >>I think the sloppy rss approach is the right way to go. > > > Is this really that much of a problem? Why not leave rss as an _ACCURATE_ > count of pages. That way stuff like limits based upon rss and accounting > of memory usage are accurate. > I think I agree. (But Christoph is right that in practice probably nobody or very few will ever notice). > Have we tried splitting into seperate cache lines? How about grouped counters > for every 16 cpus instead of a per-cpu counter as proposed by someone else > earlier. > 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. Nick