Re: [PATCH] guard mm->rss with page_table_lock (241p11)

Rasmus Andersen (rasmus@jaquet.dk)
Tue, 30 Jan 2001 09:31:59 +0100


On Tue, Jan 30, 2001 at 08:18:56AM +0000, David Howells wrote:
> >...
> > + spin_lock(&mm->page_table_lock);
> > mm->rss++;
> > + spin_unlock(&mm->page_table_lock);
> >...
>
> Would it not be better to use some sort of atomic add/subtract/clear operation
> rather than a spinlock? (Which would also give you fewer atomic memory access
> cycles).

This will unfortunately not do for all platforms. Please read
http://marc.theaimsgroup.com/?t=97630768100003&w=2&r=1 for the
last discussion of this.

Regards,
Rasmus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/