From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 17 Aug 2005 16:01:02 -0700 (PDT) From: Linus Torvalds Subject: Re: pagefault scalability patches In-Reply-To: Message-ID: References: <20050817151723.48c948c7.akpm@osdl.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: Andrew Morton , Hugh Dickins , Nick Piggin , linux-mm@kvack.org List-ID: On Wed, 17 Aug 2005, Christoph Lameter wrote: > > We are trading 2x (spinlock(page_table_lock), > spin_unlock(page_table_lock)) against one atomic inc. Bzzt. Thank you for playing. Spinunlock is free on x86 and x86-64, since it's a plain normal store. The x86 memory ordering semantics take care of the rest. In other words, one uncontended spinlock/unlock pair is pretty much _exactly_ the same cost as one single atomic operation, and there is no win. 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