From: Michael Breuer <mbreuer@majjas.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: x86 - cpu_relax - why nop vs. pause?
Date: Sun, 07 Feb 2010 12:28:51 -0500 [thread overview]
Message-ID: <4B6EF853.9090704@majjas.com> (raw)
I did search and noticed some old discussions. Looking at both Intel and
AMD documentation, it would seem that PAUSE is the preferred instruction
within a spin lock. Further, both Intel and AMD specifications state
that the instruction is backward compatible with older x86 processors.
For fun, I changed nop to pause on my core i7 920 (smt enabled) and I'm
seeing about a 5-10% performance improvement on 2.6.33 rc7. Perf top
shows time spent in spin_lock under load drops from an average of around
35% to about 25%.
Thoughts?
next reply other threads:[~2010-02-07 17:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 17:28 Michael Breuer [this message]
2010-02-07 18:09 ` x86 - cpu_relax - why nop vs. pause? Joerg Roedel
2010-02-07 18:32 ` Arjan van de Ven
[not found] ` <1265566470.6280.10.camel@marge.simson.net>
2010-02-07 20:08 ` Michael Breuer
2010-02-07 21:15 ` Michael Breuer
2010-02-08 3:50 ` Michael Breuer
2010-02-08 13:33 ` Artur Skawina
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=4B6EF853.9090704@majjas.com \
--to=mbreuer@majjas.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.