요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
======================
S/390 common I/O-Layer
======================
command line parameters, procfs and debugfs entries
===================================================
Command line parameters
-----------------------
* ccw_timeout_log
Enable logging of debug information in case of ccw device timeouts.
* cio_ignore = device[,device[,..]]
device := {all | [!]ipldev | [!]condev | [!]<devno> | [!]<devno>-<devno>}
The given devices will be ignored by the common I/O-layer; no detection
and device sensing will be done on any of those devices. The subchannel to
which the device in question is attached will be treated as if no device was
attached.
An ignored device can be un-ignored later; see the "/proc entries"-section for
details.
The devices must be given either as bus ids (0.x.abcd) or as hexadecimal
device numbers (0xabcd or abcd, for 2.4 backward compatibility). If you
give a device number 0xabcd, it will be interpreted as 0.0.abcd.
You can use the 'all' keyword to ignore all devices. The 'ipldev' and 'condev'
keywords can be used to refer to the CCW based boot device and CCW console
device respectively (these are probably useful only when combined with the '!'
operator). The '!' operator will cause the I/O-layer to _not_ ignore a device.
The command line
is parsed from left to right.
For example::
cio_ignore=0.0.0023-0.0.0042,0.0.4711
will ignore all devices ranging from 0.0.0023 to 0.0.0042 and the device
0.0.4711, if detected.
As another example::
cio_ignore=all,!0.0.4711,!0.0.fd00-0.0.fd02
will ignore all devices but 0.0.4711, 0.0.fd00, 0.0.fd01, 0.0.fd02.
By default, no devices are ignored.
/proc entries
-------------
* /proc/cio_ignore
Lists the ranges of devices (by bus id) which are ignored by common I/O.
You can un-ignore certain or all devices by piping to /proc/cio_ignore.
"free all" will un-ignore all ignored devices,
"free <device range>, <device range>, ..." will un-ignore the specified
devices.
For example, if devices 0.0.0023 to 0.0.0042 and 0.0.4711 are ignored,
- echo free 0.0.0030-0.0.0032 > /proc/cio_ignore
will un-ignore devices 0.0.0030 to 0.0.0032 and will leave devices 0.0.0023
to 0.0.002f, 0.0.0033 to 0.0.0042 and 0.0.4711 ignored;
- echo free 0.0.0041 > /proc/cio_ignore will furthermore un-ignore device
0.0.0041;
- echo free all > /proc/cio_ignore will un-ignore all remaining ignored
devices.
When a device is un-ignored, device recognition and sensing is performed and
the device driver will be notified if possible, so the device will become
available to the system. Note that un-ignoring is performed asynchronously.
You can also add ranges of devices to be ignored by piping to
/proc/cio_ignore; "add <device range>, <device range>, ..." will ignore the
specified devices.
Note: While already known devices can be added to the list of devices to be
ignored, there will be no effect on then. However, if such a device
disappears and then reappears, it will then be ignored. To make
known devices go away, you need the "purge" command (see below).
For example::
"echo add 0.0.a000-0.0.accc, 0.0.af00-0.0.afff > /proc/cio_ignore"
will add 0.0.a000-0.0.accc and 0.0.af00-0.0.afff to the list of ignored
devices.
You can remove already known but now ignored devices via::
"echo purge > /proc/cio_ignore"
All devices ignored but still registered and not online (= not in use)
will be deregistered and thus removed from the system.
The devices can be specified either by bus id (0.x.abcd) or, for 2.4 backward
compatibility, by the device number in hexadecimal (0xabcd or abcd). Device
numbers given as 0xabcd will be interpreted as 0.0.abcd.
* /proc/cio_settle
A write request to this file is blocked until all queued cio actions are
handled. This will allow userspace to wait for pending work affecting
device availability after changing cio_ignore or the hardware configuration.
* For some of the information present in the /proc filesystem in 2.4 (namely,
/proc/subchannels and /proc/chpids), see driver-model.txt.
Information formerly in /proc/irq_count is now in /proc/interrupts.
debugfs entries
---------------
* /sys/kernel/debug/s390dbf/cio_*/ (S/390 debug feature)
Some views generated by the debug feature to hold various debug outputs.
- /sys/kernel/debug/s390dbf/cio_crw/sprintf
Messages from the processing of pending channel report words (machine check
handling).
- /sys/kernel/debug/s390dbf/cio_msg/sprintf
Various debug messages from the common I/O-layer.
- /sys/kernel/debug/s390dbf/cio_trace/hex_ascii
Logs the calling of functions in the common I/O-layer and, if applicable,
which subchannel they were called for, as well as dumps of some data
structures (like irb in an error case).
The level of logging can be changed to be more or less verbose by piping to
/sys/kernel/debug/s390dbf/cio_*/level a number between 0 and 6; see the
documentation on the S/390 debug feature (Documentation/arch/s390/s390dbf.rst)
for details.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
S/390 공통 I/O 계층
1-7이 문서는 S/390 공통 I/O 계층의 커널 명령줄 매개변수와 procfs 및 debugfs 항목을 설명합니다.
ccw_timeout_log 명령줄 매개변수
8-14`ccw_timeout_log`를 지정하면 CCW 장치 시간 초과가 발생했을 때 디버그 정보 기록을 활성화합니다.
cio_ignore 문법과 해석
15-37`cio_ignore` 매개변수의 장치 지정 문법은 다음과 같습니다.
device := {all | [!]ipldev | [!]condev | [!]<devno> | [!]<devno>-<devno>}
지정한 장치는 공통 I/O 계층에서 무시됩니다. 해당 장치에는 탐지와 device sensing을 수행하지 않으며, 장치가 연결된 서브채널은 아무 장치도 연결되지 않은 것처럼 취급합니다. 무시한 장치는 나중에 `/proc/cio_ignore`로 다시 활성화할 수 있습니다.
장치는 버스 ID `0.x.abcd` 또는 2.4 호환용 16진수 장치 번호 `0xabcd`나 `abcd`로 지정합니다. `0xabcd` 형식은 `0.0.abcd`로 해석됩니다.
| 토큰 | 의미 |
|---|---|
| `all` | 모든 장치를 무시합니다. |
| `ipldev` | CCW 기반 부팅 장치를 가리킵니다. |
| `condev` | CCW 콘솔 장치를 가리킵니다. |
| `<devno>` | 장치 하나를 지정합니다. |
| `<devno>-<devno>` | 연속 장치 범위를 지정합니다. |
| `!` | 뒤따르는 장치를 무시하지 않도록 예외 처리합니다. |
명령줄은 왼쪽에서 오른쪽으로 해석됩니다. `ipldev`와 `condev`는 보통 `!` 연산자와 조합할 때 유용합니다.
cio_ignore 예제
38-53다음 예는 탐지된 장치 가운데 `0.0.0023`부터 `0.0.0042`까지와 `0.0.4711`을 무시합니다.
cio_ignore=0.0.0023-0.0.0042,0.0.4711
다음 예는 모든 장치를 먼저 무시한 뒤 `0.0.4711`과 `0.0.fd00`부터 `0.0.fd02`까지를 예외로 남깁니다.
cio_ignore=all,!0.0.4711,!0.0.fd00-0.0.fd02
기본값에서는 어떤 장치도 무시하지 않습니다.
쉼표로 구분된 규칙은 왼쪽부터 순서대로 누적 적용됩니다.
/proc/cio_ignore와 free
54-65`/proc/cio_ignore`는 공통 I/O 계층이 무시하는 장치 범위를 버스 ID 형식으로 나열합니다. 이 파일에 명령을 쓰면 일부 또는 모든 장치를 ignore 목록에서 해제할 수 있습니다.
| 명령 | 동작 |
|---|---|
| `free all` | 무시 중인 모든 장치를 해제합니다. |
| `free <device range>, <device range>, ...` | 지정한 장치 또는 범위만 해제합니다. |
free, add, purge 동작
66-105`0.0.0023-0.0.0042`와 `0.0.4711`이 무시 중이라고 가정하면 다음과 같이 동작합니다.
| 명령 | 결과 |
|---|---|
| `echo free 0.0.0030-0.0.0032 > /proc/cio_ignore` | `0.0.0030-0.0.0032`를 해제하고 `0.0.0023-0.0.002f`, `0.0.0033-0.0.0042`, `0.0.4711`은 계속 무시합니다. |
| `echo free 0.0.0041 > /proc/cio_ignore` | `0.0.0041`도 추가로 해제합니다. |
| `echo free all > /proc/cio_ignore` | 남은 모든 ignored 장치를 해제합니다. |
장치를 해제하면 장치 인식과 sensing을 수행하고 가능하면 장치 드라이버에 알리므로 장치가 시스템에서 사용 가능해집니다. 이 해제 처리는 비동기식입니다.
`add <device range>, <device range>, ...`를 `/proc/cio_ignore`에 쓰면 지정 범위를 ignore 목록에 추가합니다. 이미 알려진 장치를 추가해도 즉시 효과는 없지만 그 장치가 사라졌다가 다시 나타나면 무시됩니다. 이미 알려진 장치를 제거하려면 `purge`가 필요합니다.
다음 명령은 두 범위를 ignore 목록에 추가합니다.
"echo add 0.0.a000-0.0.accc, 0.0.af00-0.0.afff > /proc/cio_ignore"
`0.0.a000-0.0.accc`와 `0.0.af00-0.0.afff`가 무시할 장치 목록에 추가됩니다.
다음 명령은 이미 알려져 있지만 현재 무시되는 장치를 제거합니다.
"echo purge > /proc/cio_ignore"
무시 중이면서 여전히 등록돼 있고 온라인이 아닌, 즉 사용 중이 아닌 모든 장치를 등록 해제하여 시스템에서 제거합니다.
여기서도 장치는 버스 ID `0.x.abcd` 또는 2.4 호환용 16진수 장치 번호 `0xabcd`나 `abcd`로 지정할 수 있으며, `0xabcd`는 `0.0.abcd`로 해석됩니다.
/proc/cio_settle과 이전 proc 항목
106-117`/proc/cio_settle`에 대한 쓰기 요청은 대기 중인 모든 CIO 작업이 처리될 때까지 블록됩니다. 사용 공간은 `cio_ignore` 또는 하드웨어 구성을 바꾼 뒤 장치 가용성에 영향을 주는 작업이 끝날 때까지 이 파일로 기다릴 수 있습니다.
Linux 2.4의 `/proc/subchannels`와 `/proc/chpids`가 제공하던 정보는 원문이 가리키는 `driver-model.txt`를 참조하십시오. 과거 `/proc/irq_count`에 있던 정보는 이제 `/proc/interrupts`에 있습니다.
debugfs 항목
118-140S/390 debug feature는 `/sys/kernel/debug/s390dbf/cio_*/` 아래에 여러 공통 I/O 디버그 뷰를 생성합니다.
| debugfs 경로 | 내용 |
|---|---|
| `/sys/kernel/debug/s390dbf/cio_crw/sprintf` | 대기 중인 channel report word 처리, 즉 machine check 처리에서 나온 메시지입니다. |
| `/sys/kernel/debug/s390dbf/cio_msg/sprintf` | 공통 I/O 계층의 여러 디버그 메시지입니다. |
| `/sys/kernel/debug/s390dbf/cio_trace/hex_ascii` | 공통 I/O 계층 함수 호출과 대상 서브채널을 기록하고, 오류 시 `irb` 같은 일부 데이터 구조를 덤프합니다. |
`/sys/kernel/debug/s390dbf/cio_*/level`에 0부터 6 사이의 숫자를 쓰면 기록 수준을 더 자세하거나 간단하게 바꿀 수 있습니다. 자세한 내용은 `Documentation/arch/s390/s390dbf.rst`의 S/390 debug feature 문서를 참조하십시오.
요약과 해설
common_io.rst:1-140`cio_ignore`는 부팅 시 장치 탐지와 sensing 대상을 줄이고, `/proc/cio_ignore`의 `free`, `add`, `purge`는 실행 중 ignore 집합을 조정합니다. 규칙은 왼쪽부터 적용되며 `!`로 부팅·콘솔 장치나 특정 범위를 예외 처리할 수 있습니다.
`/proc/cio_settle`은 비동기 CIO 작업 완료를 기다리는 동기화 지점이고, `/sys/kernel/debug/s390dbf/cio_*` 뷰는 channel report word, 일반 메시지, 함수·서브채널 추적을 제공합니다.