← Documents Documentation/arch/x86/intel-hfi.rst GitHub 원문 ↗

Linux 6.18.37 · Architecture

Hardware-Feedback Interface for scheduling on Intel Hardware

Intel HFI의 per-CPU performance·energy capability와 package thermal interrupt 전달을 설명합니다.

Source pathDocumentation/arch/x86/intel-hfi.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

intel-hfi.rst:1-72

HFI는 각 CPU의 performance와 energy-efficiency capability를 0-255 값으로 제공해 kernel과 policy daemon의 task placement를 돕습니다. 값은 thermal 또는 power condition에 따라 runtime에 달라질 수 있습니다.

package-level HFI table update는 local APIC thermal vector interrupt로 전달됩니다. driver가 table을 parse해 thermal notification framework로 userspace에 relay하며 update storm을 막기 위해 `CONFIG_HZ` jiffies로 throttle합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ============================================================
4 Hardware-Feedback Interface for scheduling on Intel Hardware
5 ============================================================
6
7 Overview
8 --------
9
10 Intel has described the Hardware Feedback Interface (HFI) in the Intel 64 and
11 IA-32 Architectures Software Developer's Manual (Intel SDM) Volume 3 Section
12 14.6 [1]_.
13
14 The HFI gives the operating system a performance and energy efficiency
15 capability data for each CPU in the system. Linux can use the information from
16 the HFI to influence task placement decisions.
17
18 The Hardware Feedback Interface
19 -------------------------------
20
21 The Hardware Feedback Interface provides to the operating system information
22 about the performance and energy efficiency of each CPU in the system. Each
23 capability is given as a unit-less quantity in the range [0-255]. Higher values
24 indicate higher capability. Energy efficiency and performance are reported in
25 separate capabilities. Even though on some systems these two metrics may be
26 related, they are specified as independent capabilities in the Intel SDM.
27
28 These capabilities may change at runtime as a result of changes in the
29 operating conditions of the system or the action of external factors. The rate
30 at which these capabilities are updated is specific to each processor model. On
31 some models, capabilities are set at boot time and never change. On others,
32 capabilities may change every tens of milliseconds. For instance, a remote
33 mechanism may be used to lower Thermal Design Power. Such change can be
34 reflected in the HFI. Likewise, if the system needs to be throttled due to
35 excessive heat, the HFI may reflect reduced performance on specific CPUs.
36
37 The kernel or a userspace policy daemon can use these capabilities to modify
38 task placement decisions. For instance, if either the performance or energy
39 capabilities of a given logical processor becomes zero, it is an indication that
40 the hardware recommends to the operating system to not schedule any tasks on
41 that processor for performance or energy efficiency reasons, respectively.
42
43 Implementation details for Linux
44 --------------------------------
45
46 The infrastructure to handle thermal event interrupts has two parts. In the
47 Local Vector Table of a CPU's local APIC, there exists a register for the
48 Thermal Monitor Register. This register controls how interrupts are delivered
49 to a CPU when the thermal monitor generates and interrupt. Further details
50 can be found in the Intel SDM Vol. 3 Section 10.5 [1]_.
51
52 The thermal monitor may generate interrupts per CPU or per package. The HFI
53 generates package-level interrupts. This monitor is configured and initialized
54 via a set of machine-specific registers. Specifically, the HFI interrupt and
55 status are controlled via designated bits in the IA32_PACKAGE_THERM_INTERRUPT
56 and IA32_PACKAGE_THERM_STATUS registers, respectively. There exists one HFI
57 table per package. Further details can be found in the Intel SDM Vol. 3
58 Section 14.9 [1]_.
59
60 The hardware issues an HFI interrupt after updating the HFI table and is ready
61 for the operating system to consume it. CPUs receive such interrupt via the
62 thermal entry in the Local APIC's Local Vector Table.
63
64 When servicing such interrupt, the HFI driver parses the updated table and
65 relays the update to userspace using the thermal notification framework. Given
66 that there may be many HFI updates every second, the updates relayed to
67 userspace are throttled at a rate of CONFIG_HZ jiffies.
68
69 References
70 ----------
71
72 .. [1] https://www.intel.com/sdm
73

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

HFI의 scheduling 목적

1-17

이 `GPL-2.0` 문서는 Intel hardware의 scheduling용 Hardware Feedback Interface(HFI)를 설명합니다. Intel 64 and IA-32 Architectures Software Developer's Manual(Intel SDM) Volume 3 Section 14.6에 정의되어 있습니다.

HFI는 system의 각 CPU에 대한 performance와 energy-efficiency capability data를 operating system에 제공합니다. Linux는 이 information으로 task placement decision에 영향을 줄 수 있습니다.

0-255 capability와 runtime 변화

18-42
capability범위와 의미
performanceunitless `0-255`; 높을수록 performance capability가 큽니다.
energy efficiencyunitless `0-255`; 높을수록 energy-efficiency capability가 큽니다.

두 metric이 일부 system에서 연관될 수 있지만 Intel SDM은 독립 capability로 정의합니다. operating condition 또는 external factor에 따라 runtime에 바뀔 수 있고 update rate는 processor model-specific입니다.

일부 model은 boot 때 설정한 뒤 바뀌지 않지만 다른 model은 수십 millisecond마다 바뀔 수 있습니다. remote mechanism으로 Thermal Design Power를 낮추거나 excessive heat 때문에 특정 CPU를 throttle하면 HFI가 감소한 capability를 반영할 수 있습니다.

kernel 또는 userspace policy daemon은 capability를 task placement에 반영할 수 있습니다. logical processor의 performance 또는 energy capability가 0이면 hardware가 각각 performance 또는 energy-efficiency 이유로 그 processor에 task를 schedule하지 말라고 권고한다는 뜻입니다.

package interrupt와 userspace notification

43-68

thermal-event interrupt infrastructure에는 두 부분이 있습니다. CPU local APIC의 Local Vector Table에는 Thermal Monitor Register가 있으며 thermal monitor가 interrupt를 만들 때 CPU delivery 방식을 제어합니다. 자세한 내용은 Intel SDM Volume 3 Section 10.5에 있습니다.

thermal monitor는 per-CPU 또는 per-package interrupt를 만들 수 있고 HFI는 package-level interrupt를 사용합니다. machine-specific register 집합으로 configure·initialize합니다.

registerHFI 역할
`IA32_PACKAGE_THERM_INTERRUPT`지정 bit로 HFI interrupt를 제어합니다.
`IA32_PACKAGE_THERM_STATUS`지정 bit로 HFI status를 제어합니다.

package마다 HFI table 하나가 있습니다. 자세한 내용은 Intel SDM Volume 3 Section 14.9에 있습니다. hardware가 table을 update하고 OS가 읽을 준비가 되면 HFI interrupt를 발생시킵니다. CPU는 local APIC Local Vector Table의 thermal entry를 통해 받습니다.

handler에서 HFI driver는 updated table을 parse하고 thermal notification framework로 userspace에 update를 전달합니다. 매초 update가 많을 수 있으므로 userspace relay는 `CONFIG_HZ` jiffies rate로 throttle합니다.

Intel SDM reference

69-72

Intel 64 and IA-32 Architectures Software Developer's Manual은 `https://www.intel.com/sdm`에서 확인할 수 있습니다.