linux-parisc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>,
	Davidlohr Bueso <davidlohr@hp.com>,
	Ingo Molnar <mingo@kernel.org>,
	Mikulas Patocka <mpatocka@redhat.com>,
	Jason Low <jason.low2@hp.com>, Waiman Long <waiman.long@hp.com>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>,
	John David Anglin <dave.anglin@bell.net>,
	"Chandramouleeswaran, Aswin" <aswin@hp.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Parisc List <linux-parisc@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	James Hogan <james.hogan@imgtec.com>,
	Chris Metcalf <cmetcalf@tilera.com>,
	Vineet Gupta <vgupta@synopsys.com>
Subject: Re: [PATCH 2/2] locking/rwsem: Disable optimistic spinning for PA-RISC
Date: Fri, 6 Jun 2014 10:22:21 -0700	[thread overview]
Message-ID: <CA+55aFxNLRufHyLHetnst7Lq0Ya1xoAagZf=DbEDTf1ZSfKFCQ@mail.gmail.com> (raw)
In-Reply-To: <20140606171145.GU13930@laptop.programming.kicks-ass.net>

On Fri, Jun 6, 2014 at 10:11 AM, Peter Zijlstra <peterz@infradead.org> wrote:
>
> +config ARCH_NO_ATOMIC_RMW
> +       def_bool y
> +       depends on PARISC || SPARC32 || METAG_ATOMICITY_LOCK1 || (TILE && !TILEGX) || (ARC && !ARC_HAS_LLSC)

Ugh. We've had these kinds of things before, and they are broken and
nasty to maintain.

Just make it

    config ARCH_SUPPORTS_ATOMIC_RMW
        bool

which defaults to no. And then make MUTEX_SPIN_ON_OWNER depend on that.

And then we can add "select ARCH_SUPPORTS_ATOMIC_RMW" to the few
architectures we (a) care about and (b) know work. So start with x86,
arm, powerpc and sparc64, and then the rest can just add their own
oneliners if they care.

Remember, most people really won't ever care about this, simply
because it only matters if you have enough CPU's for the whole
spinning thing to make a noticeable difference.  So missing some odd
architecture _really_ doesn't matter.

And we really really *really* shouldn't have these kinds of "random
really odd architecture details" in the generic code, not even if it's
something as specific as kernel/Kconfig.locks.

               Linus

              Linus

  parent reply	other threads:[~2014-06-06 17:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06 15:55 [PATCH 0/2] locking/rwsem: disable optimistic spinning for PA-RISC Davidlohr Bueso
2014-06-06 15:55 ` [PATCH 1/2] locking/rwsem: Add CONFIG_RWSEM_SPIN_ON_OWNER Davidlohr Bueso
2014-06-06 17:13   ` Jason Low
2014-06-06 18:12     ` Davidlohr Bueso
2014-06-06 18:48       ` Davidlohr Bueso
2014-06-06 19:08         ` Jason Low
2014-06-06 19:20           ` Davidlohr Bueso
2014-06-06 15:55 ` [PATCH 2/2] locking/rwsem: Disable optimistic spinning for PA-RISC Davidlohr Bueso
2014-06-06 16:09   ` James Bottomley
2014-06-06 17:11     ` Peter Zijlstra
2014-06-06 17:19       ` Chris Metcalf
2014-06-06 17:22       ` Linus Torvalds [this message]
2014-06-06 17:53         ` Peter Zijlstra
2014-06-06 17:57           ` James Bottomley
2014-06-06 17:58             ` James Bottomley
2014-06-06 18:01             ` Peter Zijlstra

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+55aFxNLRufHyLHetnst7Lq0Ya1xoAagZf=DbEDTf1ZSfKFCQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=aswin@hp.com \
    --cc=cmetcalf@tilera.com \
    --cc=dave.anglin@bell.net \
    --cc=davem@davemloft.net \
    --cc=davidlohr@hp.com \
    --cc=james.hogan@imgtec.com \
    --cc=jason.low2@hp.com \
    --cc=jejb@parisc-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=vgupta@synopsys.com \
    --cc=waiman.long@hp.com \
    /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).