요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/devices/system/machinecheck/machinecheckX/tolerant
Contact: Borislav Petkov <bp@suse.de>
Date: Dec, 2021
Description:
Unused and obsolete after the advent of recoverable machine
checks (see last sentence below) and those are present since
2010 (Nehalem).
Original description:
The entries appear for each CPU, but they are truly shared
between all CPUs.
Tolerance level. When a machine check exception occurs for a
non corrected machine check the kernel can take different
actions.
Since machine check exceptions can happen any time it is
sometimes risky for the kernel to kill a process because it
defies normal kernel locking rules. The tolerance level
configures how hard the kernel tries to recover even at some
risk of deadlock. Higher tolerant values trade potentially
better uptime with the risk of a crash or even corruption
(for tolerant >= 3).
== ===========================================================
0 always panic on uncorrected errors, log corrected errors
1 panic or SIGBUS on uncorrected errors, log corrected errors
2 SIGBUS or log uncorrected errors, log corrected errors
3 never panic or SIGBUS, log all errors (for testing only)
== ===========================================================
Default: 1
Note this only makes a difference if the CPU allows recovery
from a machine check exception. Current x86 CPUs generally
do not.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Machine check tolerant
1-37| 항목 | 값 |
|---|---|
| What | /sys/devices/system/machinecheck/machinecheckX/tolerant |
| Contact | Borislav Petkov <bp@suse.de> |
| Date | 2021년 12월 |
| Default | 1 |
2010년 Nehalem부터 복구 가능한 machine check가 등장한 뒤 이 attribute는 사용되지 않고 obsolete가 됐다. 다음은 원래 설명이다.
Entry는 CPU마다 나타나지만 실제 값은 모든 CPU가 공유한다. 이 값은 tolerance level이다. Correct되지 않은 machine check에 의해 machine check exception이 발생하면 kernel은 여러 대응 가운데 하나를 선택할 수 있다.
Machine check exception은 언제든 발생할 수 있으므로 process를 종료하는 동작이 정상적인 kernel locking rule을 어길 수 있어 위험할 때가 있다. Tolerance level은 deadlock 위험을 일부 감수하면서 kernel이 복구를 얼마나 강하게 시도할지 정한다. 값이 높으면 잠재적으로 더 나은 uptime을 얻는 대신 crash 위험이 커지며, tolerant가 3 이상이면 corruption 위험까지 감수한다.
| 값 | Uncorrected error | Corrected error |
|---|---|---|
| 0 | 항상 panic | 기록 |
| 1 | panic 또는 SIGBUS | 기록 |
| 2 | SIGBUS 또는 기록 | 기록 |
| 3 | panic이나 SIGBUS 없이 모두 기록, test 전용 | 기록 |
이 설정은 CPU가 machine check exception에서 복구할 수 있을 때만 차이를 만든다. 원문 작성 당시의 x86 CPU는 일반적으로 복구를 허용하지 않았다.
Machine check 허용 수준
sysfs-mce:1-37복구 가능한 machine check가 도입된 뒤 사용되지 않아 obsolete가 된 attribute이며, 값이 높을수록 uptime을 우선하지만 deadlock·crash·corruption 위험이 커졌습니다.