Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754534Ab0AEITJ (ORCPT ); Tue, 5 Jan 2010 03:19:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754515Ab0AEITG (ORCPT ); Tue, 5 Jan 2010 03:19:06 -0500 Received: from casper.infradead.org ([85.118.1.10]:35329 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754510Ab0AEITF (ORCPT ); Tue, 5 Jan 2010 03:19:05 -0500 Subject: Re: [RFC][PATCH 6/8] mm: handle_speculative_fault() From: Peter Zijlstra To: Linus Torvalds Cc: KAMEZAWA Hiroyuki , Minchan Kim , "Paul E. McKenney" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , cl@linux-foundation.org, "hugh.dickins" , Nick Piggin , Ingo Molnar In-Reply-To: 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> Content-Type: text/plain; charset="UTF-8" Date: Tue, 05 Jan 2010 09:18:16 +0100 Message-ID: <1262679496.2400.14.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 951 Lines: 19 On Mon, 2010-01-04 at 21:10 -0800, Linus Torvalds wrote: > Sounds doable. But it also sounds way more expensive than the current VM > fault handling, which is pretty close to optimal for single-threaded > cases.. That RCU lookup might be cheap, but just the refcount is generally > going to be as expensive as a lock. Right, that refcount adds two atomic ops, the only grace it has is that its in the vma as opposed to the mm, but there are plenty workloads that concentrate on a single vma, in which case you get an equally contended cacheline as with the mmap_sem. I was trying to avoid having to have that refcount, but then sorta forgot about the actual fault handlers also poking at the vma :/ -- 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/