lkml.org 
[lkml]   [2010]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectx86 - cpu_relax - why nop vs. pause?
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?


\
 
 \ /
  Last update: 2010-02-07 18:31    [W:0.060 / U:3.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site