Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756369AbZGCPa0 (ORCPT ); Fri, 3 Jul 2009 11:30:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755914AbZGCPaL (ORCPT ); Fri, 3 Jul 2009 11:30:11 -0400 Received: from rhun.apana.org.au ([64.62.148.172]:56476 "EHLO arnor.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754747AbZGCPaJ (ORCPT ); Fri, 3 Jul 2009 11:30:09 -0400 Date: Fri, 3 Jul 2009 23:29:51 +0800 From: Herbert Xu To: Mathieu Desnoyers Cc: mingo@elte.hu, jolsa@redhat.com, a.p.zijlstra@chello.nl, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, fbl@redhat.com, nhorman@redhat.com, davem@redhat.com, htejun@gmail.com, jarkao2@gmail.com, oleg@redhat.com, davidel@xmailserver.org, eric.dumazet@gmail.com, Paul.McKenney@us.ibm.com Subject: Re: [PATCHv5 2/2] memory barrier: adding smp_mb__after_lock Message-ID: <20090703152951.GA28837@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090703140401.GA10256@Krystal> Organization: Core X-Newsgroups: apana.lists.os.linux.kernel,apana.lists.os.linux.netdev User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 976 Lines: 28 Mathieu Desnoyers wrote: > > Why don't we create a read_lock without acquire semantic instead (e.g. > read_lock_nomb(), or something with a better name like __read_lock()) ? > On architectures where memory barriers are needed to provide the acquire > semantic, it would be faster to do : > > __read_lock(); > smp_mb(); > > than : > > read_lock(); <- e.g. lwsync + isync or something like that > smp_mb(); <- full sync. Hmm, why do we even care when read_lock should just die? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- 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/