Documentation/driver-api/cxl/platform/acpi/srat.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API / CXL / Platform / ACPI

SRAT - Static Resource Affinity Table

SRAT의 Memory·Generic Port Affinity가 CFMWS range와 CXL path를 proximity domain에 연결하는 방식을 설명합니다.

Source pathDocumentation/driver-api/cxl/platform/acpi/srat.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

srat.rst:1-71

SRAT는 CXL memory range와 Generic Port를 proximity domain에 연결해 NUMA topology의 토대를 만듭니다. CEDT CFMWS와 SRAT Memory Affinity가 맞아야 하고, hotplug path 성능은 Generic Port handle을 HMAT target과 연결해 계산합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 =====================================
4 SRAT - Static Resource Affinity Table
5 =====================================
6
7 The System/Static Resource Affinity Table describes resource (CPU, Memory)
8 affinity to "Proximity Domains". This table is technically optional, but for
9 performance information (see "HMAT") to be enumerated by linux it must be
10 present.
11
12 There is a careful dance between the CEDT and SRAT tables and how NUMA nodes are
13 created. If things don't look quite the way you expect - check the SRAT Memory
14 Affinity entries and CEDT CFMWS to determine what your platform actually
15 supports in terms of flexible topologies.
16
17 The SRAT may statically assign portions of a CFMWS SPA range to a specific
18 proximity domains. See linux numa creation for more information about how
19 this presents in the NUMA topology.
20
21 Proximity Domain
22 ================
23 A proximity domain is ROUGHLY equivalent to "NUMA Node" - though a 1-to-1
24 mapping is not guaranteed. There are scenarios where "Proximity Domain 4" may
25 map to "NUMA Node 3", for example. (See "NUMA Node Creation")
26
27 Memory Affinity
28 ===============
29 Generally speaking, if a host does any amount of CXL fabric (decoder)
30 programming in BIOS - an SRAT entry for that memory needs to be present.
31
32 Example ::
33
34 Subtable Type : 01 [Memory Affinity]
35 Length : 28
36 Proximity Domain : 00000001 <- NUMA Node 1
37 Reserved1 : 0000
38 Base Address : 000000C050000000 <- Physical Memory Region
39 Address Length : 0000003CA0000000
40 Reserved2 : 00000000
41 Flags (decoded below) : 0000000B
42 Enabled : 1
43 Hot Pluggable : 1
44 Non-Volatile : 0
45
46
47 Generic Port Affinity
48 =====================
49 The Generic Port Affinity subtable provides an association between a proximity
50 domain and a device handle representing a Generic Port such as a CXL host
51 bridge. With the association, latency and bandwidth numbers can be retrieved
52 from the SRAT for the path between CPU(s) (initiator) and the Generic Port.
53 This is used to construct performance coordinates for hotplugged CXL DEVICES,
54 which cannot be enumerated at boot by platform firmware.
55
56 Example ::
57
58 Subtable Type : 06 [Generic Port Affinity]
59 Length : 20 <- 32d, length of table
60 Reserved : 00
61 Device Handle Type : 00 <- 0 - ACPI, 1 - PCI
62 Proximity Domain : 00000001
63 Device Handle : ACPI0016:01
64 Flags : 00000001 <- Bit 0 (Enabled)
65 Reserved : 00000000
66
67 The Proximity Domain is matched up to the :doc:`HMAT <hmat>` SSLBI Target
68 Proximity Domain List for the related latency or bandwidth numbers. Those
69 performance numbers are tied to a CXL host bridge via the Device Handle.
70 The driver uses the association to retrieve the Generic Port performance
71 numbers for the whole CXL path access coordinates calculation.
72

3. 한국어 전문 번역

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

SRAT와 CEDT의 관계

1-20
.. SPDX-License-Identifier: GPL-2.0

System/Static Resource Affinity Table(SRAT)은 CPU·Memory resource가 어떤 `Proximity Domain`에 속하는지 설명합니다. 기술적으로 선택 사항이지만, Linux가 HMAT의 성능 정보를 열거하려면 SRAT가 반드시 존재해야 합니다.

NUMA node 생성에는 CEDT와 SRAT가 세심하게 맞물립니다. 예상한 topology와 다르다면 SRAT Memory Affinity entry와 CEDT CFMWS를 함께 확인해 platform이 실제로 지원하는 flexible topology를 판단해야 합니다.

SRAT는 CFMWS SPA range의 일부를 특정 proximity domain에 정적으로 할당할 수 있습니다. 이 구성이 NUMA topology에 어떻게 나타나는지는 Linux NUMA node 생성 설명을 참조하십시오.

Proximity Domain과 Memory Affinity

21-31

Proximity domain은 대략 `NUMA Node`와 같지만 1:1 mapping이 보장되지는 않습니다. 예를 들어 `Proximity Domain 4`가 `NUMA Node 3`에 mapping될 수 있습니다. 자세한 내용은 `NUMA Node Creation`을 참조하십시오.

일반적으로 BIOS가 CXL fabric(decoder)을 조금이라도 programming했다면 해당 memory의 SRAT entry가 존재해야 합니다.

Memory Affinity 예시

32-46

예시는 physical memory region을 Proximity Domain 1, 즉 NUMA Node 1에 연결하고 해당 range가 enabled·hot-pluggable이며 non-volatile은 아님을 나타냅니다.

        Subtable Type : 01 [Memory Affinity]
               Length : 28
     Proximity Domain : 00000001          <- NUMA Node 1
            Reserved1 : 0000
         Base Address : 000000C050000000  <- Physical Memory Region
       Address Length : 0000003CA0000000
            Reserved2 : 00000000
Flags (decoded below) : 0000000B
             Enabled : 1
       Hot Pluggable : 1
        Non-Volatile : 0

Generic Port Affinity

47-71

Generic Port Affinity subtable은 proximity domain과 CXL host bridge 같은 Generic Port를 나타내는 device handle을 연결합니다. 이 연결을 통해 CPU(initiator)와 Generic Port 사이 path의 latency와 bandwidth 값을 SRAT에서 가져올 수 있습니다.

platform firmware가 boot 시 열거할 수 없는 hotplug CXL device의 performance coordinate를 구성할 때 이 정보가 사용됩니다.

     Subtable Type : 06 [Generic Port Affinity]
            Length : 20               <- 32d, length of table
          Reserved : 00
Device Handle Type : 00               <- 0 - ACPI, 1 - PCI
  Proximity Domain : 00000001
     Device Handle : ACPI0016:01
             Flags : 00000001         <- Bit 0 (Enabled)
          Reserved : 00000000
Generic Port Affinity 연결
FieldValueMeaning
Subtable Type06Generic Port Affinity
Length2032 bytes
Device Handle Type00ACPI handle(1은 PCI)
Proximity Domain00000001성능 정보와 연결할 domain
Device HandleACPI0016:01CXL host bridge 식별자
Flags00000001Bit 0 Enabled

SRAT subtable이 proximity domain을 CXL host bridge device handle에 연결하는 field를 정리했습니다.

Proximity Domain은 관련 latency 또는 bandwidth 값을 가진 HMAT SSLBI Target Proximity Domain List와 대응됩니다. 이 성능 값은 Device Handle을 통해 CXL host bridge에 연결되며, driver는 이 연결을 사용해 전체 CXL path의 access coordinate 계산에 필요한 Generic Port 성능 값을 가져옵니다.