요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
=====================================
SRAT - Static Resource Affinity Table
=====================================
The System/Static Resource Affinity Table describes resource (CPU, Memory)
affinity to "Proximity Domains". This table is technically optional, but for
performance information (see "HMAT") to be enumerated by linux it must be
present.
There is a careful dance between the CEDT and SRAT tables and how NUMA nodes are
created. If things don't look quite the way you expect - check the SRAT Memory
Affinity entries and CEDT CFMWS to determine what your platform actually
supports in terms of flexible topologies.
The SRAT may statically assign portions of a CFMWS SPA range to a specific
proximity domains. See linux numa creation for more information about how
this presents in the NUMA topology.
Proximity Domain
================
A proximity domain is ROUGHLY equivalent to "NUMA Node" - though a 1-to-1
mapping is not guaranteed. There are scenarios where "Proximity Domain 4" may
map to "NUMA Node 3", for example. (See "NUMA Node Creation")
Memory Affinity
===============
Generally speaking, if a host does any amount of CXL fabric (decoder)
programming in BIOS - an SRAT entry for that memory needs to be present.
Example ::
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
=====================
The Generic Port Affinity subtable provides an association between a proximity
domain and a device handle representing a Generic Port such as a CXL host
bridge. With the association, latency and bandwidth numbers can be retrieved
from the SRAT for the path between CPU(s) (initiator) and the Generic Port.
This is used to construct performance coordinates for hotplugged CXL DEVICES,
which cannot be enumerated at boot by platform firmware.
Example ::
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
The Proximity Domain is matched up to the :doc:`HMAT <hmat>` SSLBI Target
Proximity Domain List for the related latency or bandwidth numbers. Those
performance numbers are tied to a CXL host bridge via the Device Handle.
The driver uses the association to retrieve the Generic Port performance
numbers for the whole CXL path access coordinates calculation.
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-31Proximity 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-71Generic 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
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 성능 값을 가져옵니다.
요약과 해설
srat.rst:1-71SRAT는 CXL memory range와 Generic Port를 proximity domain에 연결해 NUMA topology의 토대를 만듭니다. CEDT CFMWS와 SRAT Memory Affinity가 맞아야 하고, hotplug path 성능은 Generic Port handle을 HMAT target과 연결해 계산합니다.