Re: page fault scalability patch V11 [0/7]: overview

From: Linus Torvalds <>
Date: 2004-11-20 13:06:52
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);
		rss += tsk->rss;

Or does anybody see any better approaches?

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Fri Nov 19 21:22:33 2004

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