Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752959Ab0AHVhU (ORCPT ); Fri, 8 Jan 2010 16:37:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752214Ab0AHVhS (ORCPT ); Fri, 8 Jan 2010 16:37:18 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:54595 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751034Ab0AHVhR (ORCPT ); Fri, 8 Jan 2010 16:37:17 -0500 Date: Fri, 8 Jan 2010 13:36:47 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Christoph Lameter cc: Peter Zijlstra , 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: 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> <20100106092212.c8766aa8.kamezawa.hiroyu@jp.fujitsu.com> <20100106115233.5621bd5e.kamezawa.hiroyu@jp.fujitsu.com> <20100106125625.b02c1b3a.kamezawa.hiroyu@jp.fujitsu.com> <1262969610.4244.36.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: 1014 Lines: 24 On Fri, 8 Jan 2010, Christoph Lameter wrote: > > I'd say that the ticket lock sucks for short critical sections vs. a > simple spinlock since it forces the cacheline into shared mode. Btw, I do agree that it's likely made worse by the fairness of the ticket locks and the resulting extra traffic of people waiting for their turn. Often for absolutely no good reason, since in this case the rwlock itself will then be granted for reading in most cases - and there are no ordering issues on readers. We worried about the effects of fair spinlocks when introducing the ticket locks, but nobody ever actually had a load that seemed to indicate it made much of a difference, and we did have a few cases where starvation was a very noticeable problem. 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/