PPC 的 x86 PAUSE 指令的等效项
是否存在与 x86 PAUSE 指令等效的指令,该指令被放置在繁忙的等待循环中以提高性能,特别是在 SMT 机器上、PowerPC 上?
Does there exist an equivalent of the x86 PAUSE instruction, which is placed within busy waiting loops to improve performance, particularly on SMT machines, on PowerPC?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 Linux 内核中,我们在 arch/powerpc/include/asm/processor.h 中有这个,
我不熟悉 x86 PAUSE,但听起来“或 31,31,31”就是你想要的。
您在哪种 powerpc 处理器上执行此操作?对于 SMT 必须是 POWER5、6 或 7?
In the Linux kernel we have this in arch/powerpc/include/asm/processor.h
I'm not familiar with x86 PAUSE, but sounds like "or 31,31,31" is what you want.
Which powerpc processor are you doing this on? For SMT it must be POWER5, 6 or 7?
Cell 内部的 PowerPC 将识别某些 NOP 编码作为调整内核中两个物理线程的相对优先级的指示。 文档列出了这些特殊 NOP 的
cctpl
、cctpm
和cctph
扩展助记符。从其他 Google 结果来看,IBM RS64 系列可能具有类似的特殊 NOP 指令,因此该功能可能已经在各种 IBM PowerPC 芯片的“Book IV”中存在相当长一段时间了。
Power ISA 2.06 文档在第 3 章中提供了额外的特殊 NOP 定义以及扩展助记符,例如
yield
、mdoio
和mdoom
。它还定义了与 Cell 中的cctpl
和cctpm
相同的 NOP。The PowerPC inside of Cell will recognize certain NOP encodings as indication to adjust the relative priority of the two physical threads in the core. The documentation lists the
cctpl
,cctpm
, andcctph
extended mnemonics for these special NOPs.From the look of other Google results, it looks like perhaps the IBM RS64 line had similar special NOP instructions, so this functionality has probably been in "Book IV" of various IBM PowerPC chips for quite some time.
The Power ISA 2.06 document has additional special NOP definitions in chapter 3 with extended mnemonics like
yield
,mdoio
, andmdoom
. It also defines the same NOPs ascctpl
andcctpm
from Cell.