Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755808Ab0AEUrM (ORCPT ); Tue, 5 Jan 2010 15:47:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755541Ab0AEUrK (ORCPT ); Tue, 5 Jan 2010 15:47:10 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:51192 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754817Ab0AEUrI (ORCPT ); Tue, 5 Jan 2010 15:47:08 -0500 Date: Tue, 5 Jan 2010 12:46:12 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Peter Zijlstra cc: Christoph Lameter , Andi Kleen , KAMEZAWA Hiroyuki , Minchan Kim , "Paul E. McKenney" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "hugh.dickins" , Nick Piggin , Ingo Molnar Subject: Re: [RFC][PATCH 6/8] mm: handle_speculative_fault() In-Reply-To: <1262723356.4049.11.camel@laptop> Message-ID: References: <20100104182429.833180340@chello.nl> <20100104182813.753545361@chello.nl> <20100105092559.1de8b613.kamezawa.hiroyu@jp.fujitsu.com> <28c262361001042029w4b95f226lf54a3ed6a4291a3b@mail.gmail.com> <20100105134357.4bfb4951.kamezawa.hiroyu@jp.fujitsu.com> <20100105143046.73938ea2.kamezawa.hiroyu@jp.fujitsu.com> <20100105163939.a3f146fb.kamezawa.hiroyu@jp.fujitsu.com> <87wrzwbh0z.fsf@basil.nowhere.org> <1262723356.4049.11.camel@laptop> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1135 Lines: 28 On Tue, 5 Jan 2010, Peter Zijlstra wrote: > > On Tue, 2010-01-05 at 10:25 -0800, Linus Torvalds wrote: > > The readers are all hitting the > > lock (and you can try to solve the O(n*2) issue with back-off, but quite > > frankly, anybody who does that has basically already lost > > /me sneaks in a reference to local spinning spinlocks just to have them > mentioned. Were you in on the discussion with (I think) Andy Glew about that? I don't think he ever came up with an actual workable solution, but he tried. He worked for Intel at the time (maybe still does), and was looking at architectural improvements. I think you need a "compare-and-exchange-2- separate-words" instruction to make it work (not "cmpxchg8/16b" - literally two _different_ words). I think m68k can do it. Even then it's a lot more expensive than a regular lock for any reasonable common case. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/