← Documents Documentation/ABI/stable/sysfs-devices-system-cpu GitHub 원문 ↗

Linux 6.18.37 · ABI / stable

CPU topology stable sysfs ABI

System-wide·per-CPU DSCR 기본값과 core, cluster, die, package 및 s390 book·drawer topology 식별자와 CPU mask를 설명합니다.

Source pathDocumentation/ABI/stable/sysfs-devices-system-cpu
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

Data Stream Control Register 기본값

sysfs-devices-system-cpu:1-25

전체 CPU의 per-CPU default를 한 번에 설정하는 dscr_default와 process별 override·상속 규칙을 다룹니다.

Topology identifier

sysfs-devices-system-cpu:27-55

CPU가 속한 die, core, cluster와 s390 전용 book·drawer의 hardware platform identifier를 제공합니다.

Topology CPU mask와 list

sysfs-devices-system-cpu:57-117

동일 topology domain에 속한 CPU를 hexadecimal bitmask와 사람이 읽는 decimal list 두 형식으로 제공합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 What: /sys/devices/system/cpu/dscr_default
2 Date: 13-May-2014
3 KernelVersion: v3.15.0
4 Contact:
5 Description: Writes are equivalent to writing to
6 /sys/devices/system/cpu/cpuN/dscr on all CPUs.
7 Reads return the last written value or 0.
8 This value is not a global default: it is a way to set
9 all per-CPU defaults at the same time.
10 Values: 64 bit unsigned integer (bit field)
11
12 What: /sys/devices/system/cpu/cpu[0-9]+/dscr
13 Date: 13-May-2014
14 KernelVersion: v3.15.0
15 Contact:
16 Description: Default value for the Data Stream Control Register (DSCR) on
17 a CPU.
18 This default value is used when the kernel is executing and
19 for any process that has not set the DSCR itself.
20 If a process ever sets the DSCR (via direct access to the
21 SPR) that value will be persisted for that process and used
22 on any CPU where it executes (overriding the value described
23 here).
24 If set by a process it will be inherited by child processes.
25 Values: 64 bit unsigned integer (bit field)
26
27 What: /sys/devices/system/cpu/cpuX/topology/die_id
28 Description: the CPU die ID of cpuX. Typically it is the hardware platform's
29 identifier (rather than the kernel's). The actual value is
30 architecture and platform dependent.
31 Values: integer
32
33 What: /sys/devices/system/cpu/cpuX/topology/core_id
34 Description: the CPU core ID of cpuX. Typically it is the hardware platform's
35 identifier (rather than the kernel's). The actual value is
36 architecture and platform dependent.
37 Values: integer
38
39 What: /sys/devices/system/cpu/cpuX/topology/cluster_id
40 Description: the cluster ID of cpuX. Typically it is the hardware platform's
41 identifier (rather than the kernel's). The actual value is
42 architecture and platform dependent.
43 Values: integer
44
45 What: /sys/devices/system/cpu/cpuX/topology/book_id
46 Description: the book ID of cpuX. Typically it is the hardware platform's
47 identifier (rather than the kernel's). The actual value is
48 architecture and platform dependent. it's only used on s390.
49 Values: integer
50
51 What: /sys/devices/system/cpu/cpuX/topology/drawer_id
52 Description: the drawer ID of cpuX. Typically it is the hardware platform's
53 identifier (rather than the kernel's). The actual value is
54 architecture and platform dependent. it's only used on s390.
55 Values: integer
56
57 What: /sys/devices/system/cpu/cpuX/topology/core_cpus
58 Description: internal kernel map of CPUs within the same core.
59 (deprecated name: "thread_siblings")
60 Values: hexadecimal bitmask.
61
62 What: /sys/devices/system/cpu/cpuX/topology/core_cpus_list
63 Description: human-readable list of CPUs within the same core.
64 The format is like 0-3, 8-11, 14,17.
65 (deprecated name: "thread_siblings_list").
66 Values: decimal list.
67
68 What: /sys/devices/system/cpu/cpuX/topology/package_cpus
69 Description: internal kernel map of the CPUs sharing the same physical_package_id.
70 (deprecated name: "core_siblings").
71 Values: hexadecimal bitmask.
72
73 What: /sys/devices/system/cpu/cpuX/topology/package_cpus_list
74 Description: human-readable list of CPUs sharing the same physical_package_id.
75 The format is like 0-3, 8-11, 14,17.
76 (deprecated name: "core_siblings_list")
77 Values: decimal list.
78
79 What: /sys/devices/system/cpu/cpuX/topology/die_cpus
80 Description: internal kernel map of CPUs within the same die.
81 Values: hexadecimal bitmask.
82
83 What: /sys/devices/system/cpu/cpuX/topology/die_cpus_list
84 Description: human-readable list of CPUs within the same die.
85 The format is like 0-3, 8-11, 14,17.
86 Values: decimal list.
87
88 What: /sys/devices/system/cpu/cpuX/topology/cluster_cpus
89 Description: internal kernel map of CPUs within the same cluster.
90 Values: hexadecimal bitmask.
91
92 What: /sys/devices/system/cpu/cpuX/topology/cluster_cpus_list
93 Description: human-readable list of CPUs within the same cluster.
94 The format is like 0-3, 8-11, 14,17.
95 Values: decimal list.
96
97 What: /sys/devices/system/cpu/cpuX/topology/book_siblings
98 Description: internal kernel map of cpuX's hardware threads within the same
99 book_id. it's only used on s390.
100 Values: hexadecimal bitmask.
101
102 What: /sys/devices/system/cpu/cpuX/topology/book_siblings_list
103 Description: human-readable list of cpuX's hardware threads within the same
104 book_id.
105 The format is like 0-3, 8-11, 14,17. it's only used on s390.
106 Values: decimal list.
107
108 What: /sys/devices/system/cpu/cpuX/topology/drawer_siblings
109 Description: internal kernel map of cpuX's hardware threads within the same
110 drawer_id. it's only used on s390.
111 Values: hexadecimal bitmask.
112
113 What: /sys/devices/system/cpu/cpuX/topology/drawer_siblings_list
114 Description: human-readable list of cpuX's hardware threads within the same
115 drawer_id.
116 The format is like 0-3, 8-11, 14,17. it's only used on s390.
117 Values: decimal list.
118

3. 한국어 전문 번역

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

System-wide DSCR write helper

1-10
항목내용
What/sys/devices/system/cpu/dscr_default
Date2014년 5월 13일
KernelVersionv3.15.0
Contact원문에 기재되지 않음
Values64-bit unsigned integer bit field

이 파일에 값을 쓰는 동작은 모든 CPU의 /sys/devices/system/cpu/cpuN/dscr에 같은 값을 쓰는 것과 같다. 읽으면 마지막으로 쓴 값을 반환하며, 아직 쓴 적이 없으면 0을 반환한다.

이 값은 하나의 global default가 아니다. 모든 per-CPU default를 같은 시점에 한꺼번에 설정하기 위한 interface다.

Per-CPU DSCR default와 process override

12-25
항목내용
What/sys/devices/system/cpu/cpu[0-9]+/dscr
Date2014년 5월 13일
KernelVersionv3.15.0
Contact원문에 기재되지 않음
Values64-bit unsigned integer bit field

각 CPU에서 Data Stream Control Register(DSCR)에 사용할 기본값이다. Kernel이 실행 중일 때와 DSCR을 직접 설정하지 않은 process가 실행될 때 이 기본값을 사용한다.

Process가 SPR에 직접 접근해 DSCR을 한 번이라도 설정하면 그 값은 해당 process의 상태로 보존된다. 이후 어느 CPU에서 실행되더라도 그 process 값이 사용되며, 여기서 설명한 per-CPU 기본값을 덮어쓴다.

Process가 설정한 DSCR 값은 child process에도 상속된다.

실행 context에 따른 DSCR 선택
Process가 DSCR을 직접 설정하지 않음현재 CPU의 cpuN/dscr 기본값 사용Process가 SPR을 통해 DSCR 설정Process별 값 보존 및 CPU 이동 후에도 사용fork된 child process가 해당 값을 상속

Process가 자체 DSCR을 설정했는지가 per-CPU default 사용 여부를 결정한다.

CPU topology identifier

27-55

다음 값은 대개 kernel 내부 번호가 아니라 hardware platform이 부여한 identifier다. 실제 값과 의미 범위는 architecture와 platform에 따라 달라진다.

경로설명
cpuX/topology/die_idintegercpuX가 속한 CPU die의 ID다.
cpuX/topology/core_idintegercpuX가 속한 CPU core의 ID다.
cpuX/topology/cluster_idintegercpuX가 속한 CPU cluster의 ID다.
cpuX/topology/book_idintegercpuX가 속한 book의 ID다. s390에서만 사용한다.
cpuX/topology/drawer_idintegercpuX가 속한 drawer의 ID다. s390에서만 사용한다.

Core와 package CPU 집합

57-77
경로형식설명
cpuX/topology/core_cpushexadecimal bitmask같은 core 안에 있는 CPU의 kernel 내부 map이다. 이전 이름은 thread_siblings다.
cpuX/topology/core_cpus_listdecimal list같은 core 안에 있는 CPU를 사람이 읽기 쉬운 목록으로 표시한다. 형식 예시는 0-3,8-11,14,17이고 이전 이름은 thread_siblings_list다.
cpuX/topology/package_cpushexadecimal bitmask같은 physical_package_id를 공유하는 CPU의 kernel 내부 map이다. 이전 이름은 core_siblings다.
cpuX/topology/package_cpus_listdecimal list같은 physical_package_id를 공유하는 CPU의 사람이 읽는 목록이다. 형식 예시는 0-3,8-11,14,17이고 이전 이름은 core_siblings_list다.

Die와 cluster CPU 집합

79-95
경로형식설명
cpuX/topology/die_cpushexadecimal bitmask같은 die 안에 있는 CPU의 kernel 내부 map이다.
cpuX/topology/die_cpus_listdecimal list같은 die 안에 있는 CPU를 사람이 읽는 목록으로 표시한다. 형식 예시는 0-3,8-11,14,17이다.
cpuX/topology/cluster_cpushexadecimal bitmask같은 cluster 안에 있는 CPU의 kernel 내부 map이다.
cpuX/topology/cluster_cpus_listdecimal list같은 cluster 안에 있는 CPU를 사람이 읽는 목록으로 표시한다. 형식 예시는 0-3,8-11,14,17이다.

s390 book과 drawer sibling 집합

97-117
경로형식설명
cpuX/topology/book_siblingshexadecimal bitmaskcpuX와 같은 book_id에 속한 hardware thread의 kernel 내부 map이다. s390에서만 사용한다.
cpuX/topology/book_siblings_listdecimal listcpuX와 같은 book_id에 속한 hardware thread를 사람이 읽는 목록으로 표시한다. 형식 예시는 0-3,8-11,14,17이며 s390에서만 사용한다.
cpuX/topology/drawer_siblingshexadecimal bitmaskcpuX와 같은 drawer_id에 속한 hardware thread의 kernel 내부 map이다. s390에서만 사용한다.
cpuX/topology/drawer_siblings_listdecimal listcpuX와 같은 drawer_id에 속한 hardware thread를 사람이 읽는 목록으로 표시한다. 형식 예시는 0-3,8-11,14,17이며 s390에서만 사용한다.