From: Nicholas Piggin <npiggin@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Will Deacon <will.deacon@arm.com>,
David Miller <davem@davemloft.net>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Anton Blanchard <anton@samba.org>,
linuxppc-dev list <linuxppc-dev@ozlabs.org>
Subject: Re: [RFC][PATCH] spin loop arch primitives for busy waiting
Date: Fri, 7 Apr 2017 21:26:26 +1000 [thread overview]
Message-ID: <20170407212626.59f68530@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20170407094349.f4hdqibbgl36s776@hirez.programming.kicks-ass.net>
On Fri, 7 Apr 2017 11:43:49 +0200
Peter Zijlstra <peterz@infradead.org> wrote:
> On Thu, Apr 06, 2017 at 10:31:46AM -0700, Linus Torvalds wrote:
> > But maybe "monitor" is really cheap. I suspect it's microcoded,
> > though, which implies "no".
>
> On my IVB-EP (will also try on something newer):
>
> MONITOR ~332 cycles
> MWAIT ~224 cycles (C0, explicitly invalidated MONITOR)
>
> So yes, expensive.
Interestingly, Intel optimization manual says:
The latency of PAUSE instruction in prior generation microarchitecture
is about 10 cycles, whereas on Skylake microarchitecture it has been
extended to as many as 140 cycles.
In another part this is claimed for efficiency improvement. Still much
cheaper than your monitor+mwait on your IVB but if skylake is a bit
faster it might become worth it.
next prev parent reply other threads:[~2017-04-07 11:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 8:13 [RFC][PATCH] spin loop arch primitives for busy waiting Nicholas Piggin
2017-04-03 8:13 ` Nicholas Piggin
2017-04-03 15:31 ` Linus Torvalds
2017-04-03 15:31 ` Linus Torvalds
2017-04-03 23:50 ` 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-05 14:01 ` David Miller
2017-04-06 0:59 ` Nicholas Piggin
2017-04-06 14:13 ` Will Deacon
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 [this message]
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=20170407212626.59f68530@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=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=will.deacon@arm.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).