# 超线程

**超线程技术**（Intel® HT Technology）是英特尔对同步多线程（SMT）的专有实现。这是一种硬件技术，通过将每个物理核心呈现为两个逻辑处理器，使单个物理CPU核心能够同时执行两条代码流。<sup>[1](https://www.intel.com/content/www/us/en/developer/articles/guide/hyper-thread-tuning-guide-for-video-ai-workload.html)</sup> 每个逻辑处理器都有各自独立的架构状态副本，而缓存、执行单元和总线等物理执行资源则由两者共享。<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup> 其目标是在一个线程停顿时——例如在缓存未命中后等待数据时——让第二个线程利用空闲资源，从而使核心的流水线保持忙碌。<sup>[3](https://www.amd.com/en/blogs/2025/simultaneous-multithreading-driving-performance-a.html)</sup>

| 关键事实 | 详情 |
|---|---|
| 是什么 | 英特尔的SMT实现：一个物理核心表现为两个逻辑处理器，架构状态各自独立，执行资源共享<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup> |
| 发布时间 | 2001年8月28日，在英特尔开发者论坛上宣布，演示时声称性能提升30%<sup>[4](https://www.intel.com/pressroom/archive/releases/2001/20010828comp.htm)</sup> |
| 首批产品 | 2002年2月面向服务器的英特尔至强处理器；2002年11月14日面向台式机的3.06 GHz奔腾4<sup>[5](https://www.intel.com/pressroom/archive/releases/2002/20021114comp.htm)</sup><sup> • </sup><sup>[6](https://www.intel.com/pressroom/archive/releases/2002/20020225comp.htm)</sup> |
| 实测增益 | 在至强处理器MP上运行常见服务器应用基准测试，提升最高达30%；在台式PC上最高达25%<sup>[5](https://www.intel.com/pressroom/archive/releases/2002/20021114comp.htm)</sup><sup> • </sup><sup>[4](https://www.intel.com/pressroom/archive/releases/2001/20010828comp.htm)</sup> |
| 硬件成本 | 第一代实现使相对芯片面积和最大功耗需求增加不到5%<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup> |
| 控制方式 | 在BIOS中启用或禁用；需要操作系统支持；并非所有SKU都提供<sup>[7](https://edc.intel.com/content/www/us/en/design/ipla/software-development-platforms/client/platforms/alder-lake-desktop/12th-generation-intel-core-processors-datasheet-volume-1-of-2/003/intel-hyper-threading-technology/)</sup> |
| 安全警示 | 禁用超线程是防范MDS、L1TF等跨线程攻击的唯一完整缓解措施<sup>[8](https://docs.kernel.org/admin-guide/hw-vuln/core-scheduling.html)</sup> |

## 工作原理

支持超线程的处理器为每个逻辑处理器维护一份完整的架构状态副本。该状态包括通用寄存器、控制寄存器、高级可编程中断控制器（APIC）寄存器以及一些机器状态寄存器；每个逻辑处理器还拥有自己的APIC，因此发送到某一逻辑处理器的中断仅由该逻辑处理器处理。<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup> 从软件角度看，状态复制之后，处理器看起来就是两个处理器，操作系统和用户程序可以像向多处理器系统中的物理处理器调度线程那样，将线程调度到逻辑处理器上。<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup>

几乎其他所有资源都是共享的：缓存、执行单元、分支预测器、控制逻辑和总线。<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup> 来自两个逻辑处理器的指令在这些共享资源上同时驻留并执行。某些流水线结构是分区或受限的，而非完全共享：在第一代至强实现中，取指与分发引擎以及重排序与引退模块将部分资源分区，以便在两个线程之间交替，而快速执行引擎和缓存子系统则同时处理来自两个线程的指令。<sup>[1](https://www.intel.com/content/www/us/en/developer/articles/guide/hyper-thread-tuning-guide-for-video-ai-workload.html)</sup>

第一代实现遵循三个设计目标：最小化芯片面积；保证即使一个逻辑处理器停顿时，另一个逻辑处理器仍能向前推进；让单个活跃线程全速运行。向前推进通过分区或限制每个线程可占用的队列条目数量来保证，而当只有一个线程活跃时，分区资源会重新合并。<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup>

## 历史与产品发布

英特尔于2001年8月28日在英特尔开发者论坛上宣布并演示了这项技术（最初代号为Jackson Technology），报告性能提升30%，并表示验证测试显示，基于英特尔的服务器所支持的并发Web事务和用户数量显著增加。<sup>[4](https://www.intel.com/pressroom/archive/releases/2001/20010828comp.htm)</sup> 首个出货产品是面向双路服务器的英特尔至强处理器，于2002年2月25日发布，采用0.13微米工艺，主频为2.2、2和1.8 GHz，搭配E7500芯片组。<sup>[6](https://www.intel.com/pressroom/archive/releases/2002/20020225comp.htm)</sup> 随后推出至强处理器MP，在常见服务器应用基准测试中实测增益最高达30%。<sup>[2](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)</sup>

桌面端的可用性于2002年11月14日到来，[奔腾4](https://www.edgepedia.org/zh/pentium-4)处理器主频达到3.06 GHz，成为首款运行在每秒30亿个周期的商用微处理器；英特尔表示超线程技术可将PC性能提升最高25%。<sup>[5](https://www.intel.com/pressroom/archive/releases/2002/20021114comp.htm)</sup>

## 软件支持与调优

超线程需要操作系统支持，并通过BIOS启用。<sup>[7](https://edc.intel.com/content/www/us/en/design/ipla/software-development-platforms/client/platforms/alder-lake-desktop/12th-generation-intel-core-processors-datasheet-volume-1-of-2/003/intel-hyper-threading-technology/)</sup> 英特尔建议在[Microsoft Windows](https://www.edgepedia.org/zh/microsoft-windows) 7或更新版本中启用，而在所有更早的Windows版本中应在BIOS中禁用。<sup>[7](https://edc.intel.com/content/www/us/en/design/ipla/software-development-platforms/client/platforms/alder-lake-desktop/12th-generation-intel-core-processors-datasheet-volume-1-of-2/003/intel-hyper-threading-technology/)</sup>

由于一个核心上的两个逻辑处理器（称为关联逻辑处理器）共享执行单元以及L1和L2缓存，线程的放置位置很重要。运行在同一物理核心上的协作线程可以复用彼此的缓存数据，而竞争的线程则会争夺相同的执行单元。英特尔针对视频AI工作负载的调优指南是：为延迟敏感的工作分配非关联逻辑处理器，而为吞吐量导向的工作为每个实例分配关联逻辑处理器；在英特尔的端到端视频AI示例中，将应用程序绑定到特定处理器使英特尔至强CPU的性能提升了约10%。<sup>[1](https://www.intel.com/content/www/us/en/developer/articles/guide/hyper-thread-tuning-guide-for-video-ai-workload.html)</sup>

## 安全性

两个线程共享一个核心会扩大推测执行侧信道攻击的攻击面，因为填充缓冲区等微架构结构可能保留一个线程的数据，而兄弟线程可以对其进行探测。Linux内核文档指出，对于跨超线程攻击（MDS即微架构数据采样和L1TF即L1终端故障是其典型例子），唯一的完整缓解措施就是禁用超线程。<sup>[8](https://docs.kernel.org/admin-guide/hw-vuln/core-scheduling.html)</sup> 内核的核心调度功能提供了一种部分替代方案：它允许用户空间定义受信任的任务组，用cookie标记，只有这些任务才允许在同一核心上同时运行，因此不受信任的工作永远不会与其受害者共享核心。核心调度不能保护在兄弟超线程上运行的内核上下文彼此不受影响，而且当系统负载较轻时（总线程数等于或低于CPU数量的一半），其同步开销可能使其比完全禁用SMT更慢。<sup>[8](https://docs.kernel.org/admin-guide/hw-vuln/core-scheduling.html)</sup>

## 英特尔之外的SMT

超线程是英特尔对SMT的品牌名称，其他厂商以自己的名称实现该技术。AMD的EPYC处理器使用2路SMT，每个物理核心暴露两个逻辑处理器并共享核心的计算资源；AMD工程师估计，在[Zen 4](https://www.edgepedia.org/zh/zen-4)和Zen 5核心中，SMT逻辑占用的核心面积不到5%，该功能可以在BIOS中或Linux运行时切换。<sup>[3](https://www.amd.com/en/blogs/2025/simultaneous-multithreading-driving-performance-a.html)</sup> AMD指出，某些工作负载（如高性能计算）在关闭SMT时可能表现更好，而另一些工作负载则从中获得显著收益。<sup>[9](https://www.amd.com/en/blogs/2025/realizing-an-untapped-value-of-amd-epyc-processo.html)</sup>

在英特尔自家的混合客户端处理器上，该技术的应用并不均衡：在第12代英特尔酷睿产品中，性能核支持超线程，而能效核不支持超线程，每个能效核只暴露一个逻辑处理器。<sup>[10](https://www.intel.com/content/www/us/en/developer/articles/guide/12th-gen-intel-core-processor-gamedev-guide.html)</sup> 最近，英特尔在[Lunar Lake](https://www.edgepedia.org/zh/lunar-lake)和Arrow Lake中使用的Lion Cove性能核上移除了超线程，在Panther Lake的Cougar Cove性能核中也没有保留，同时表示将在其数据中心路线图中重新引入多线程。<sup>[11](https://www.tomshardware.com/pc-components/cpus/intel-xeon-7-diamond-rapids-cpus-officially-launching-in-2027-on-intel-18a-p-next-gen-p-core-xeon-features-pcie-6-0-50-percent-higher-core-counts-and-twice-the-memory-bandwidth)</sup>

## References

1. [Hyper-Thread Tuning Guide for End to End Video AI Workload, Intel](https://www.intel.com/content/www/us/en/developer/articles/guide/hyper-thread-tuning-guide-for-video-ai-workload.html)
2. [Marr, D. T. et al. (2002). Hyper-Threading Technology Architecture and Microarchitecture. Intel Technology Journal, Q1 2002](https://www.intel.com/content/dam/www/public/us/en/documents/research/2002-vol06-iss-1-intel-technology-journal.pdf)
3. [Simultaneous Multithreading: Driving Performance and Efficiency on AMD EPYC CPUs, AMD (2025)](https://www.amd.com/en/blogs/2025/simultaneous-multithreading-driving-performance-a.html)
4. [Intel Demonstrates Breakthrough Processor Design, Intel press release (August 28, 2001)](https://www.intel.com/pressroom/archive/releases/2001/20010828comp.htm)
5. [Intel Delivers Hyper-Threading Technology With Pentium 4 Processor 3 GHz Milestone, Intel press release (November 14, 2002)](https://www.intel.com/pressroom/archive/releases/2002/20021114comp.htm)
6. [New Intel Xeon Server Processors And Chipset Boost System Performance Up To 80 Percent, Intel press release (February 25, 2002)](https://www.intel.com/pressroom/archive/releases/2002/20020225comp.htm)
7. [Intel Hyper-Threading Technology, 12th Gen Intel Core Datasheet Volume 1, Intel](https://edc.intel.com/content/www/us/en/design/ipla/software-development-platforms/client/platforms/alder-lake-desktop/12th-generation-intel-core-processors-datasheet-volume-1-of-2/003/intel-hyper-threading-technology/)
8. [Core Scheduling, The Linux Kernel documentation](https://docs.kernel.org/admin-guide/hw-vuln/core-scheduling.html)
9. [Realizing an "Untapped Value" of AMD EPYC Processors with SMT, AMD (2025)](https://www.amd.com/en/blogs/2025/realizing-an-untapped-value-of-amd-epyc-processo.html)
10. [Game Dev Guide for 12th Gen Intel Core Processor Hybrid Architecture, Intel](https://www.intel.com/content/www/us/en/developer/articles/guide/12th-gen-intel-core-processor-gamedev-guide.html)
11. [Intel Xeon 7 'Diamond Rapids' CPUs officially launching in 2027, Tom's Hardware](https://www.tomshardware.com/pc-components/cpus/intel-xeon-7-diamond-rapids-cpus-officially-launching-in-2027-on-intel-18a-p-next-gen-p-core-xeon-features-pcie-6-0-50-percent-higher-core-counts-and-twice-the-memory-bandwidth)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026; Oct 21, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › Processors & processor engineering › Computer architecture theory › Multithreading and parallel architectures

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/hyper-threading

English original: https://www.edgepedia.org/hyper-threading
