linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH] percpu-rwsem: use barrier in unlock path
Date: Fri, 19 Oct 2012 11:48:13 -0700	[thread overview]
Message-ID: <CA+55aFzyP8OFJGWB5nZduzqMMwuAwy+1Ed5TBCpdBSOpC1ketw@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1210181132430.22996@file.rdu.redhat.com>

On Thu, Oct 18, 2012 at 9:00 AM, Mikulas Patocka <mpatocka@redhat.com> 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

      reply	other threads:[~2012-10-19 18:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.64.1210151716310.10685@file.rdu.redhat.com>
     [not found] ` <Pine.LNX.4.64.1210161924350.20581@file.rdu.redhat.com>
2012-10-17  2:23   ` [PATCH] percpu-rwsem: use barrier in unlock path Linus Torvalds
2012-10-17  5:58     ` Lai Jiangshan
2012-10-17  5:58       ` Lai Jiangshan
2012-10-17 15:07       ` Mikulas Patocka
2012-10-17 20:28         ` Steven Rostedt
2012-10-17 20:28           ` Steven Rostedt
2012-10-18  2:18           ` Lai Jiangshan
2012-10-18  4:13             ` Steven Rostedt
2012-10-18 16:17               ` Mikulas Patocka
2012-10-18 15:32             ` Mikulas Patocka
2012-10-18 19:56             ` Mikulas Patocka
2012-10-18 16:05           ` Mikulas Patocka
2012-10-17  9:56     ` Alan Cox
2012-10-18 16:00     ` Mikulas Patocka
2012-10-19 18:48       ` Linus Torvalds [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+55aFzyP8OFJGWB5nZduzqMMwuAwy+1Ed5TBCpdBSOpC1ketw@mail.gmail.com \
    --to=torvalds@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=eric.dumazet@gmail.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).