From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 17 Aug 2005 16:23:41 -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 have no problems if the lock are not contended. Then we just reduce the > overhead by eliminating one semaphore instruction. We _do_ have a problem. Do a kernel benchmark on UP vs SMP, and realize that the cost of just uncontended spinlocks is about 20% on some kernel loads. That's with purely single-threaded benchmarks, tied to one CPU - the cost of atomic ops really is that high. The only difference is the spinlock/unlock. (Now, the page fault case may not be that bad, but the point remains: locking and atomic ops are bad. The anonymous page thing is one of the hottest pieces of code in the kernel under perfectly normal loads, and getting rid of spinlocks there is worth it). The thing is, I personally don't care very much at all about 5000 threads doing page faults in the same VM at the same time. I care about _one_ thread doing page faults in the same VM, and the fact that your patch, if done right, could help that. That's why I like the patch. Not because of your scalability numbers ;) So we're coming from two different angles here. 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