Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262592AbUKTCOb (ORCPT ); Fri, 19 Nov 2004 21:14:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263057AbUKTCMo (ORCPT ); Fri, 19 Nov 2004 21:12:44 -0500 Received: from fw.osdl.org ([65.172.181.6]:62606 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S263022AbUKTCHJ (ORCPT ); Fri, 19 Nov 2004 21:07:09 -0500 Date: Fri, 19 Nov 2004 18:06:52 -0800 (PST) From: Linus Torvalds To: Christoph Lameter cc: Nick Piggin , akpm@osdl.org, Benjamin Herrenschmidt , Hugh Dickins , linux-mm@kvack.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: page fault scalability patch V11 [0/7]: overview In-Reply-To: Message-ID: References: <419D581F.2080302@yahoo.com.au> <419D5E09.20805@yahoo.com.au> <1100848068.25520.49.camel@gaston> <419E98E7.1080402@yahoo.com.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1345 Lines: 39 On Fri, 19 Nov 2004, Linus Torvalds wrote: > > Not that I really see any overwhelming evidence of anybody ever really > caring, but it's nice to know that you have the option. Btw, if you are going to look at doing this rss thing, you need to make sure that thread exit ends up adding its rss to _some_ remaining sibling. I guess that was obvious, but it's worth pointing out. That may actually be the only case where we do _not_ have a nice SMP-safe access: we do have a stable sibling (tsk->thread_leader), but we don't have any good serialization _except_ for taking mmap_sem for writing. Which we currently don't do: we take it for reading (and then we possibly upgrade it to a write lock if we notice that there is a core-dump starting). We can avoid this too by having a per-mm atomic rss "spill" counter. So exit_mm() would basically do: ... tsk->mm = NULL; atomic_add(tsk->rss, &mm->rss_spill); ... and then the algorithm for getting rss would be: rss = atomic_read(mm->rss_spill); for_each_thread(..) rss += tsk->rss; Or does anybody see any better approaches? Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/