延长在Linux内核中使用的指令集(SSE,MMX)? [英] Are extended instruction sets (SSE, MMX) used in Linux kernel?

查看:246
本文介绍了延长在Linux内核中使用的指令集(SSE,MMX)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好了,他们带来了(应该至少带来)的性能有很大的提高,是不是?

Well, they bring (should bring at least) great increase in performance, isn’t it?

所以,我还没有看到任何Linux内核源,但倒是爱问:是他们以某种方式使用吗? (在这种情况下 - ?必须有一些特殊的code股的制度,没有这样的说明)

So, I haven’t seen any Linux kernel sources, but ‘d love to ask: are they used somehow? (In this case – there must be some special "code-cap" for system that has no such instructions?)

推荐答案

上证和MMX指令集有音频/视频和游戏工作之外的价值有限。您可能会发现在内核中的黑暗角落几个明确的用途,但我不会指望它。在一般情况下的答案是不,他们不是拿来主义,也不是在大多数非内核/用户空间的应用程序使用。

The SSE and MMX instruction sets have limited value outside of audio/video and gaming work. You might find a few explicit uses in dark corners of the kernel, but I wouldn't count on it. The answer in the general case is "no, they are not used", nor are they used in most non-kernel/userspace applications.

内核有时确实选择使用特定于某些CPU在某些x86指令(如present一些AMD或英特尔模型,但不是全部,也不反之亦然),如系统调用,但这些都是从SIMD指令集不同你指的,而不是一些更广泛的类似主题的扩展的一部分。

The kernel does sometimes optionally use certain x86 instructions that are specific to certain CPUs (e.g. present on some AMD or Intel models but not all, nor vice-versa), such as syscall, but these are different from the SIMD instruction sets you're referring to, and are not part of some wider set of similarly-themed extensions.

在马克的回答,我去寻找。可以轻松地识别正在使用我他们的唯一地方是在的的RAID 6图书馆(其中也有对AltiVec的支持,这是PowerPC SIMD指令集)。

After Mark's answer, I went looking. The only place I could easily identify them being used is in the RAID 6 library (which also has support for AltiVec, which is the PowerPC SIMD instruction set).

(警惕刚刚grepping树,有很多斑点,内核就知道SSE / MMX支持用户空间应用,但实际上并没有使用它。不幸的变量名的还有一对夫妇的情况下,有绝对无关,与SSE,例如在SCTP执行。)

(Be wary just grepping the tree, there are a lot of spots where the kernel "knows" about SSE/MMX to support user-space applications, but isn't actually using it. Also a couple cases of unfortunate variable names that have absolutely nothing to do with SSE, e.g. in the SCTP implementation.)

这篇关于延长在Linux内核中使用的指令集(SSE,MMX)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆