linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: torvalds@linux-foundation.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org, anton@samba.org,
	linuxppc-dev@ozlabs.org
Subject: Re: [RFC][PATCH] spin loop arch primitives for busy waiting
Date: Thu, 6 Apr 2017 10:59:58 +1000	[thread overview]
Message-ID: <20170406105958.196c6977@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20170405.070157.871721909352646302.davem@davemloft.net>

On Wed, 05 Apr 2017 07:01:57 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: Nicholas Piggin <npiggin@gmail.com>
> Date: Tue, 4 Apr 2017 13:02:33 +1000
> 
> > On Mon, 3 Apr 2017 17:43:05 -0700
> > Linus Torvalds <torvalds@linux-foundation.org> wrote:
> >   
> >> But that depends on architectures having some pattern that we *can*
> >> abstract. Would some "begin/in-loop/end" pattern like the above be
> >> sufficient?  
> > 
> > Yes. begin/in/end would be sufficient for powerpc SMT priority, and
> > for x86, and it looks like sparc64 too. So we could do that if you
> > prefer.  
> 
> Sparc64 has two cases, on older chips we can induce a cpu thread yield
> with a special sequence of instructions, and on newer chips we have
> a bonafide pause instruction.
> 
> So cpu_relax() all by itself pretty much works for us.
> 

Thanks for taking a look. The default spin primitives should just
continue to do the right thing for you in that case.

Arm has a yield instruction, ia64 has a pause... No unusual
requirements that I can see.

If there are no objections, I'll send the arch-independent part of
this through the powerpc tree (the last one I sent, which follows
Linus' preferred pattern).

Thanks,
Nick

  reply	other threads:[~2017-04-06  1:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170403081328.30266-1-npiggin@gmail.com>
     [not found] ` <CA+55aFx92vOh28CWp5zid8RzbM=5pO0Or51zS4D8M97L=69hHA@mail.gmail.com>
2017-04-03 23:50   ` [RFC][PATCH] spin loop arch primitives for busy waiting Nicholas Piggin
2017-04-04  0:43     ` Linus Torvalds
2017-04-04  3:02       ` Nicholas Piggin
2017-04-04  4:11         ` Nicholas Piggin
2017-04-05 14:01         ` David Miller
2017-04-06  0:59           ` Nicholas Piggin [this message]
2017-04-06 14:13             ` Will Deacon
2017-04-06 15:16               ` Linus Torvalds
2017-04-06 16:36                 ` Peter Zijlstra
2017-04-06 17:31                   ` Linus Torvalds
2017-04-06 19:23                     ` Peter Zijlstra
2017-04-06 19:41                       ` Linus Torvalds
2017-04-07  3:31                         ` Nicholas Piggin
2017-04-07  9:43                     ` Peter Zijlstra
2017-04-07 11:26                       ` Nicholas Piggin
2017-04-06 15:30               ` Nicholas Piggin
2017-04-07 16:13                 ` Will Deacon

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=20170406105958.196c6977@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=anton@samba.org \
    --cc=davem@davemloft.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=torvalds@linux-foundation.org \
    /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).