From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH] percpu-rwsem: use barrier in unlock path Date: Fri, 19 Oct 2012 11:48:13 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from mail-we0-f174.google.com ([74.125.82.174]:55087 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752384Ab2JSSsg (ORCPT ); Fri, 19 Oct 2012 14:48:36 -0400 In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Mikulas Patocka Cc: Jens Axboe , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Lai Jiangshan , Steven Rostedt , "Paul E. McKenney" , Peter Zijlstra , Thomas Gleixner , Eric Dumazet On Thu, Oct 18, 2012 at 9:00 AM, Mikulas Patocka wrote: > > What is the procedure for making changes that require support of > architectures? It is trivial to make a patch that moves this into > arch-specific includes, the problem is that the patch break all the > architectures - I wrote support for x86, sparc, parisc, alpha (I can test > those) but not the others. We'd need to add it to everybody. It shouldn't need per-architecture testing - since "smp_mb()" is always safe. So we could just make all architectures default to that, and then for x86 (and potentially others that have cheaper models for release-consistency) just do the optimized one. We *could* also simply do something like #ifndef smp_release_before_store #define smp_release_before_store() smp_mb() #endif and basically make the rule be that only architectures that have a cheaper one need to define it at all. That may be the correct short-term fix, since there initially would be only a single user. Linus