요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
==================================
NVDIMM Runtime Firmware Activation
==================================
Some persistent memory devices run a firmware locally on the device /
"DIMM" to perform tasks like media management, capacity provisioning,
and health monitoring. The process of updating that firmware typically
involves a reboot because it has implications for in-flight memory
transactions. However, reboots are disruptive and at least the Intel
persistent memory platform implementation, described by the Intel ACPI
DSM specification [1], has added support for activating firmware at
runtime.
A native sysfs interface is implemented in libnvdimm to allow platform
to advertise and control their local runtime firmware activation
capability.
The libnvdimm bus object, ndbusX, implements an ndbusX/firmware/activate
attribute that shows the state of the firmware activation as one of 'idle',
'armed', 'overflow', and 'busy'.
- idle:
No devices are set / armed to activate firmware
- armed:
At least one device is armed
- busy:
In the busy state armed devices are in the process of transitioning
back to idle and completing an activation cycle.
- overflow:
If the platform has a concept of incremental work needed to perform
the activation it could be the case that too many DIMMs are armed for
activation. In that scenario the potential for firmware activation to
timeout is indicated by the 'overflow' state.
The 'ndbusX/firmware/activate' property can be written with a value of
either 'live', or 'quiesce'. A value of 'quiesce' triggers the kernel to
run firmware activation from within the equivalent of the hibernation
'freeze' state where drivers and applications are notified to stop their
modifications of system memory. A value of 'live' attempts
firmware activation without this hibernation cycle. The
'ndbusX/firmware/activate' property will be elided completely if no
firmware activation capability is detected.
Another property 'ndbusX/firmware/capability' indicates a value of
'live' or 'quiesce', where 'live' indicates that the firmware
does not require or inflict any quiesce period on the system to update
firmware. A capability value of 'quiesce' indicates that firmware does
expect and injects a quiet period for the memory controller, but 'live'
may still be written to 'ndbusX/firmware/activate' as an override to
assume the risk of racing firmware update with in-flight device and
application activity. The 'ndbusX/firmware/capability' property will be
elided completely if no firmware activation capability is detected.
The libnvdimm memory-device / DIMM object, nmemX, implements
'nmemX/firmware/activate' and 'nmemX/firmware/result' attributes to
communicate the per-device firmware activation state. Similar to the
'ndbusX/firmware/activate' attribute, the 'nmemX/firmware/activate'
attribute indicates 'idle', 'armed', or 'busy'. The state transitions
from 'armed' to 'idle' when the system is prepared to activate firmware,
firmware staged + state set to armed, and 'ndbusX/firmware/activate' is
triggered. After that activation event the nmemX/firmware/result
attribute reflects the state of the last activation as one of:
- none:
No runtime activation triggered since the last time the device was reset
- success:
The last runtime activation completed successfully.
- fail:
The last runtime activation failed for device-specific reasons.
- not_staged:
The last runtime activation failed due to a sequencing error of the
firmware image not being staged.
- need_reset:
Runtime firmware activation failed, but the firmware can still be
activated via the legacy method of power-cycling the system.
[1]: https://docs.pmem.io/persistent-memory/
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
런타임 펌웨어 활성화
1-18일부 영구 메모리 장치는 DIMM에서 로컬 펌웨어를 실행해 미디어 관리, 용량 provisioning, 상태 모니터링을 수행합니다. 이 펌웨어를 갱신하는 과정은 진행 중인 메모리 transaction에 영향을 주므로 일반적으로 재부팅이 필요합니다.
재부팅은 서비스에 지장을 줍니다. Intel ACPI DSM specification에 설명된 Intel 영구 메모리 플랫폼 구현은 펌웨어를 런타임에 활성화하는 기능을 추가했습니다.
libnvdimm은 플랫폼이 로컬 런타임 펌웨어 활성화 능력을 알리고 제어할 수 있도록 native sysfs interface를 구현합니다.
장치에 staging된 펌웨어를 재부팅 대신 플랫폼 기능으로 활성화합니다.
.. SPDX-License-Identifier: GPL-2.0
==================================
NVDIMM Runtime Firmware Activation
==================================
Some persistent memory devices run a firmware locally on the device /
"DIMM" to perform tasks like media management, capacity provisioning,
and health monitoring. The process of updating that firmware typically
involves a reboot because it has implications for in-flight memory
transactions. However, reboots are disruptive and at least the Intel
persistent memory platform implementation, described by the Intel ACPI
DSM specification [1], has added support for activating firmware at
runtime.
A native sysfs interface is implemented in libnvdimm to allow platform
to advertise and control their local runtime firmware activation
capability.
ndbusX 활성화 상태
19-38libnvdimm bus object `ndbusX`는 `ndbusX/firmware/activate` 속성으로 전체 펌웨어 활성화 상태를 `idle`, `armed`, `overflow`, `busy` 중 하나로 표시합니다.
`idle`은 활성화하도록 설정하거나 armed 상태인 장치가 없음을 뜻합니다. `armed`는 하나 이상의 장치가 준비되었음을 뜻합니다.
`busy`에서는 armed 장치가 idle로 돌아가면서 activation cycle을 완료하는 중입니다.
플랫폼이 활성화에 필요한 작업을 단계적으로 계산하는 경우 너무 많은 DIMM이 한꺼번에 armed될 수 있습니다. 이 때문에 firmware activation이 timeout될 가능성이 있음을 `overflow` 상태로 알립니다.
The libnvdimm bus object, ndbusX, implements an ndbusX/firmware/activate
attribute that shows the state of the firmware activation as one of 'idle',
'armed', 'overflow', and 'busy'.
- idle:
No devices are set / armed to activate firmware
- armed:
At least one device is armed
- busy:
In the busy state armed devices are in the process of transitioning
back to idle and completing an activation cycle.
- overflow:
If the platform has a concept of incremental work needed to perform
the activation it could be the case that too many DIMMs are armed for
activation. In that scenario the potential for firmware activation to
timeout is indicated by the 'overflow' state.
live와 quiesce 모드
39-57`ndbusX/firmware/activate`에는 `live` 또는 `quiesce`를 쓸 수 있습니다. `quiesce`는 hibernation의 `freeze` 상태와 동등한 환경에서 커널이 활성화를 실행하게 하며, driver와 application에는 system memory 변경을 멈추라는 알림이 전달됩니다.
`live`는 이 hibernation cycle 없이 활성화를 시도합니다. 펌웨어 활성화 기능이 감지되지 않으면 `ndbusX/firmware/activate` 속성 자체가 생략됩니다.
`ndbusX/firmware/capability`도 `live` 또는 `quiesce`를 표시합니다. Capability가 `live`이면 펌웨어 갱신이 system quiesce period를 요구하거나 유발하지 않습니다.
Capability가 `quiesce`이면 펌웨어가 memory controller의 quiet period를 예상하고 주입한다는 뜻입니다. 그래도 사용자는 `ndbusX/firmware/activate`에 `live`를 써서 진행 중인 장치 및 application activity와 firmware update가 경합할 위험을 감수할 수 있습니다.
펌웨어 활성화 능력이 감지되지 않으면 `ndbusX/firmware/capability` 속성도 완전히 생략됩니다.
The 'ndbusX/firmware/activate' property can be written with a value of
either 'live', or 'quiesce'. A value of 'quiesce' triggers the kernel to
run firmware activation from within the equivalent of the hibernation
'freeze' state where drivers and applications are notified to stop their
modifications of system memory. A value of 'live' attempts
firmware activation without this hibernation cycle. The
'ndbusX/firmware/activate' property will be elided completely if no
firmware activation capability is detected.
Another property 'ndbusX/firmware/capability' indicates a value of
'live' or 'quiesce', where 'live' indicates that the firmware
does not require or inflict any quiesce period on the system to update
firmware. A capability value of 'quiesce' indicates that firmware does
expect and injects a quiet period for the memory controller, but 'live'
may still be written to 'ndbusX/firmware/activate' as an override to
assume the risk of racing firmware update with in-flight device and
application activity. The 'ndbusX/firmware/capability' property will be
elided completely if no firmware activation capability is detected.
nmemX 장치 상태와 활성화 결과
58-86libnvdimm memory-device 또는 DIMM object인 `nmemX`는 장치별 상태를 알리기 위해 `nmemX/firmware/activate`와 `nmemX/firmware/result` 속성을 구현합니다.
Bus 속성과 비슷하게 장치의 activate 속성은 `idle`, `armed`, `busy`를 표시합니다. System이 firmware activation을 준비하고, firmware가 staging되어 state가 armed로 설정된 뒤 `ndbusX/firmware/activate`가 trigger되면 장치 상태는 `armed`에서 `idle`로 바뀝니다.
Activation event 뒤 `nmemX/firmware/result`는 마지막 활성화 결과를 표시합니다. `none`은 장치가 마지막으로 reset된 뒤 런타임 활성화를 trigger하지 않았다는 뜻이고, `success`는 마지막 활성화가 성공했다는 뜻입니다.
`fail`은 장치별 이유로 실패했음을 뜻합니다. `not_staged`는 firmware image를 staging하지 않은 sequence error 때문에 실패했음을 뜻합니다. `need_reset`은 런타임 활성화는 실패했지만 system power cycle이라는 기존 방법으로 펌웨어를 여전히 활성화할 수 있음을 뜻합니다.
DIMM을 준비한 뒤 bus activation을 trigger하고 결과 속성에서 최종 상태를 확인합니다.
The libnvdimm memory-device / DIMM object, nmemX, implements
'nmemX/firmware/activate' and 'nmemX/firmware/result' attributes to
communicate the per-device firmware activation state. Similar to the
'ndbusX/firmware/activate' attribute, the 'nmemX/firmware/activate'
attribute indicates 'idle', 'armed', or 'busy'. The state transitions
from 'armed' to 'idle' when the system is prepared to activate firmware,
firmware staged + state set to armed, and 'ndbusX/firmware/activate' is
triggered. After that activation event the nmemX/firmware/result
attribute reflects the state of the last activation as one of:
- none:
No runtime activation triggered since the last time the device was reset
- success:
The last runtime activation completed successfully.
- fail:
The last runtime activation failed for device-specific reasons.
- not_staged:
The last runtime activation failed due to a sequencing error of the
firmware image not being staged.
- need_reset:
Runtime firmware activation failed, but the firmware can still be
activated via the legacy method of power-cycling the system.
[1]: https://docs.pmem.io/persistent-memory/
요약과 해설
firmware-activate.rst:1-86libnvdimm은 bus 단위 activation mode와 상태, DIMM 단위 armed 상태와 최종 결과를 sysfs로 노출합니다. `quiesce`는 memory 변경을 정지한 환경에서 실행하고 `live`는 진행 중인 activity와의 경합 위험을 감수합니다.