요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Topology identifier
sysfs-devices-system-cpu:27-55CPU가 속한 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 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/devices/system/cpu/dscr_default
Date: 13-May-2014
KernelVersion: v3.15.0
Contact:
Description: Writes are equivalent to writing to
/sys/devices/system/cpu/cpuN/dscr on all CPUs.
Reads return the last written value or 0.
This value is not a global default: it is a way to set
all per-CPU defaults at the same time.
Values: 64 bit unsigned integer (bit field)
What: /sys/devices/system/cpu/cpu[0-9]+/dscr
Date: 13-May-2014
KernelVersion: v3.15.0
Contact:
Description: Default value for the Data Stream Control Register (DSCR) on
a CPU.
This default value is used when the kernel is executing and
for any process that has not set the DSCR itself.
If a process ever sets the DSCR (via direct access to the
SPR) that value will be persisted for that process and used
on any CPU where it executes (overriding the value described
here).
If set by a process it will be inherited by child processes.
Values: 64 bit unsigned integer (bit field)
What: /sys/devices/system/cpu/cpuX/topology/die_id
Description: the CPU die ID of cpuX. Typically it is the hardware platform's
identifier (rather than the kernel's). The actual value is
architecture and platform dependent.
Values: integer
What: /sys/devices/system/cpu/cpuX/topology/core_id
Description: the CPU core ID of cpuX. Typically it is the hardware platform's
identifier (rather than the kernel's). The actual value is
architecture and platform dependent.
Values: integer
What: /sys/devices/system/cpu/cpuX/topology/cluster_id
Description: the cluster ID of cpuX. Typically it is the hardware platform's
identifier (rather than the kernel's). The actual value is
architecture and platform dependent.
Values: integer
What: /sys/devices/system/cpu/cpuX/topology/book_id
Description: the book ID of cpuX. Typically it is the hardware platform's
identifier (rather than the kernel's). The actual value is
architecture and platform dependent. it's only used on s390.
Values: integer
What: /sys/devices/system/cpu/cpuX/topology/drawer_id
Description: the drawer ID of cpuX. Typically it is the hardware platform's
identifier (rather than the kernel's). The actual value is
architecture and platform dependent. it's only used on s390.
Values: integer
What: /sys/devices/system/cpu/cpuX/topology/core_cpus
Description: internal kernel map of CPUs within the same core.
(deprecated name: "thread_siblings")
Values: hexadecimal bitmask.
What: /sys/devices/system/cpu/cpuX/topology/core_cpus_list
Description: human-readable list of CPUs within the same core.
The format is like 0-3, 8-11, 14,17.
(deprecated name: "thread_siblings_list").
Values: decimal list.
What: /sys/devices/system/cpu/cpuX/topology/package_cpus
Description: internal kernel map of the CPUs sharing the same physical_package_id.
(deprecated name: "core_siblings").
Values: hexadecimal bitmask.
What: /sys/devices/system/cpu/cpuX/topology/package_cpus_list
Description: human-readable list of CPUs sharing the same physical_package_id.
The format is like 0-3, 8-11, 14,17.
(deprecated name: "core_siblings_list")
Values: decimal list.
What: /sys/devices/system/cpu/cpuX/topology/die_cpus
Description: internal kernel map of CPUs within the same die.
Values: hexadecimal bitmask.
What: /sys/devices/system/cpu/cpuX/topology/die_cpus_list
Description: human-readable list of CPUs within the same die.
The format is like 0-3, 8-11, 14,17.
Values: decimal list.
What: /sys/devices/system/cpu/cpuX/topology/cluster_cpus
Description: internal kernel map of CPUs within the same cluster.
Values: hexadecimal bitmask.
What: /sys/devices/system/cpu/cpuX/topology/cluster_cpus_list
Description: human-readable list of CPUs within the same cluster.
The format is like 0-3, 8-11, 14,17.
Values: decimal list.
What: /sys/devices/system/cpu/cpuX/topology/book_siblings
Description: internal kernel map of cpuX's hardware threads within the same
book_id. it's only used on s390.
Values: hexadecimal bitmask.
What: /sys/devices/system/cpu/cpuX/topology/book_siblings_list
Description: human-readable list of cpuX's hardware threads within the same
book_id.
The format is like 0-3, 8-11, 14,17. it's only used on s390.
Values: decimal list.
What: /sys/devices/system/cpu/cpuX/topology/drawer_siblings
Description: internal kernel map of cpuX's hardware threads within the same
drawer_id. it's only used on s390.
Values: hexadecimal bitmask.
What: /sys/devices/system/cpu/cpuX/topology/drawer_siblings_list
Description: human-readable list of cpuX's hardware threads within the same
drawer_id.
The format is like 0-3, 8-11, 14,17. it's only used on s390.
Values: decimal list.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
System-wide DSCR write helper
1-10| 항목 | 내용 |
|---|---|
| What | /sys/devices/system/cpu/dscr_default |
| Date | 2014년 5월 13일 |
| KernelVersion | v3.15.0 |
| Contact | 원문에 기재되지 않음 |
| Values | 64-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 |
| Date | 2014년 5월 13일 |
| KernelVersion | v3.15.0 |
| Contact | 원문에 기재되지 않음 |
| Values | 64-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에도 상속된다.
Process가 자체 DSCR을 설정했는지가 per-CPU default 사용 여부를 결정한다.
CPU topology identifier
27-55다음 값은 대개 kernel 내부 번호가 아니라 hardware platform이 부여한 identifier다. 실제 값과 의미 범위는 architecture와 platform에 따라 달라진다.
| 경로 | 값 | 설명 |
|---|---|---|
| cpuX/topology/die_id | integer | cpuX가 속한 CPU die의 ID다. |
| cpuX/topology/core_id | integer | cpuX가 속한 CPU core의 ID다. |
| cpuX/topology/cluster_id | integer | cpuX가 속한 CPU cluster의 ID다. |
| cpuX/topology/book_id | integer | cpuX가 속한 book의 ID다. s390에서만 사용한다. |
| cpuX/topology/drawer_id | integer | cpuX가 속한 drawer의 ID다. s390에서만 사용한다. |
Core와 package CPU 집합
57-77| 경로 | 형식 | 설명 |
|---|---|---|
| cpuX/topology/core_cpus | hexadecimal bitmask | 같은 core 안에 있는 CPU의 kernel 내부 map이다. 이전 이름은 thread_siblings다. |
| cpuX/topology/core_cpus_list | decimal list | 같은 core 안에 있는 CPU를 사람이 읽기 쉬운 목록으로 표시한다. 형식 예시는 0-3,8-11,14,17이고 이전 이름은 thread_siblings_list다. |
| cpuX/topology/package_cpus | hexadecimal bitmask | 같은 physical_package_id를 공유하는 CPU의 kernel 내부 map이다. 이전 이름은 core_siblings다. |
| cpuX/topology/package_cpus_list | decimal list | 같은 physical_package_id를 공유하는 CPU의 사람이 읽는 목록이다. 형식 예시는 0-3,8-11,14,17이고 이전 이름은 core_siblings_list다. |
Die와 cluster CPU 집합
79-95| 경로 | 형식 | 설명 |
|---|---|---|
| cpuX/topology/die_cpus | hexadecimal bitmask | 같은 die 안에 있는 CPU의 kernel 내부 map이다. |
| cpuX/topology/die_cpus_list | decimal list | 같은 die 안에 있는 CPU를 사람이 읽는 목록으로 표시한다. 형식 예시는 0-3,8-11,14,17이다. |
| cpuX/topology/cluster_cpus | hexadecimal bitmask | 같은 cluster 안에 있는 CPU의 kernel 내부 map이다. |
| cpuX/topology/cluster_cpus_list | decimal list | 같은 cluster 안에 있는 CPU를 사람이 읽는 목록으로 표시한다. 형식 예시는 0-3,8-11,14,17이다. |
s390 book과 drawer sibling 집합
97-117| 경로 | 형식 | 설명 |
|---|---|---|
| cpuX/topology/book_siblings | hexadecimal bitmask | cpuX와 같은 book_id에 속한 hardware thread의 kernel 내부 map이다. s390에서만 사용한다. |
| cpuX/topology/book_siblings_list | decimal list | cpuX와 같은 book_id에 속한 hardware thread를 사람이 읽는 목록으로 표시한다. 형식 예시는 0-3,8-11,14,17이며 s390에서만 사용한다. |
| cpuX/topology/drawer_siblings | hexadecimal bitmask | cpuX와 같은 drawer_id에 속한 hardware thread의 kernel 내부 map이다. s390에서만 사용한다. |
| cpuX/topology/drawer_siblings_list | decimal list | cpuX와 같은 drawer_id에 속한 hardware thread를 사람이 읽는 목록으로 표시한다. 형식 예시는 0-3,8-11,14,17이며 s390에서만 사용한다. |
Data Stream Control Register 기본값
sysfs-devices-system-cpu:1-25전체 CPU의 per-CPU default를 한 번에 설정하는 dscr_default와 process별 override·상속 규칙을 다룹니다.