From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 18 Aug 2005 21:49:24 -0700 (PDT) From: Linus Torvalds Subject: Re: [RFC] Concept for delayed counter updates in mm_struct In-Reply-To: <20050818212939.7dca44c3.akpm@osdl.org> Message-ID: References: <20050817151723.48c948c7.akpm@osdl.org> <20050817174359.0efc7a6a.akpm@osdl.org> <20050818212939.7dca44c3.akpm@osdl.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Andrew Morton Cc: Christoph Lameter , hugh@veritas.com, nickpiggin@yahoo.com.au, linux-mm@kvack.org List-ID: On Thu, 18 Aug 2005, Andrew Morton wrote: > Christoph Lameter wrote: > > > What is missing in this patch are points were mm_counter_catchup can be called. > > These points must be code where the page table lock is held. One way of providing > > these would be to call mm_counter_catchup when a task is in the scheduler. > > > > That sounds sane. But that patch doesn't work. There's no locking around the scheduler. It's all per-CPU, and the only exclusivity is in the per-rq locking. So if you gather the mm counters in the scheduler, you'd need to do it all with atomic ops. But you're still using the non-atomic add_mm_counter.. So you need to make those mm counters really atomic now. Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org