요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>
===========================
Power Management Strategies
===========================
:Copyright: |copy| 2017 Intel Corporation
:Author: Rafael J. Wysocki <[email protected]>
The Linux kernel supports two major high-level power management strategies.
One of them is based on using global low-power states of the whole system in
which user space code cannot be executed and the overall system activity is
significantly reduced, referred to as :doc:`sleep states <sleep-states>`. The
kernel puts the system into one of these states when requested by user space
and the system stays in it until a special signal is received from one of
designated devices, triggering a transition to the ``working state`` in which
user space code can run. Because sleep states are global and the whole system
is affected by the state changes, this strategy is referred to as the
:doc:`system-wide power management <system-wide>`.
The other strategy, referred to as the :doc:`working-state power management
<working-state>`, is based on adjusting the power states of individual hardware
components of the system, as needed, in the working state. In consequence, if
this strategy is in use, the working state of the system usually does not
correspond to any particular physical configuration of it, but can be treated as
a metastate covering a range of different power states of the system in which
the individual components of it can be either ``active`` (in use) or
``inactive`` (idle). If they are active, they have to be in power states
allowing them to process data and to be accessed by software. In turn, if they
are inactive, ideally, they should be in low-power states in which they may not
be accessible.
If all of the system components are active, the system as a whole is regarded as
"runtime active" and that situation typically corresponds to the maximum power
draw (or maximum energy usage) of it. If all of them are inactive, the system
as a whole is regarded as "runtime idle" which may be very close to a sleep
state from the physical system configuration and power draw perspective, but
then it takes much less time and effort to start executing user space code than
for the same system in a sleep state. However, transitions from sleep states
back to the working state can only be started by a limited set of devices, so
typically the system can spend much more time in a sleep state than it can be
runtime idle in one go. For this reason, systems usually use less energy in
sleep states than when they are runtime idle most of the time.
Moreover, the two power management strategies address different usage scenarios.
Namely, if the user indicates that the system will not be in use going forward,
for example by closing its lid (if the system is a laptop), it probably should
go into a sleep state at that point. On the other hand, if the user simply goes
away from the laptop keyboard, it probably should stay in the working state and
use the working-state power management in case it becomes idle, because the user
may come back to it at any time and then may want the system to be immediately
accessible.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Power management 전략 개요
1-14이 문서는 `SPDX-License-Identifier: GPL-2.0`을 따르고 `<isonum.txt>`를 포함합니다. 저작권은 2017 Intel Corporation에 있으며, 작성자는 Rafael J. Wysocki `<[email protected]>`입니다.
Linux kernel은 두 가지 주요 high-level power management 전략을 지원합니다.
System-wide power management
15-23첫 번째 전략은 system 전체의 global low-power state를 사용합니다. 이 상태에서는 user space code를 실행할 수 없고 system 전체 활동이 크게 줄어들며, 이를 `sleep states`라고 합니다.
Userspace가 요청하면 kernel은 system을 sleep state 중 하나로 전환합니다. System은 지정된 device 중 하나에서 특별한 signal을 받을 때까지 그 상태를 유지하며, signal은 user space code를 실행할 수 있는 `working state`로의 전환을 시작합니다. Sleep state는 전역이고 state 변경이 system 전체에 영향을 주므로 이 전략을 `system-wide power management`라고 합니다.
Working-state power management
24-47두 번째 전략인 `working-state power management`는 working state에서 필요에 따라 system의 개별 hardware component power state를 조정합니다. 이 전략을 사용하면 system의 working state는 대개 특정한 하나의 물리적 configuration을 뜻하지 않습니다. 대신 각 component가 `active`, 즉 사용 중이거나 `inactive`, 즉 idle일 수 있는 여러 system power state 범위를 포괄하는 metastate로 볼 수 있습니다.
Active component는 data를 처리하고 software가 접근할 수 있는 power state에 있어야 합니다. 반대로 inactive component는 이상적으로 접근할 수 없을 수도 있는 low-power state에 있어야 합니다.
모든 system component가 active이면 system 전체를 `runtime active`로 간주하며, 보통 최대 power draw 또는 최대 energy usage에 해당합니다. 모두 inactive이면 system 전체를 `runtime idle`로 간주합니다. 물리적 system configuration과 power draw 관점에서는 sleep state에 매우 가까울 수 있지만, sleep state인 같은 system보다 user space code 실행을 시작하는 데 훨씬 적은 시간과 노력이 듭니다.
다만 sleep state에서 working state로의 전환은 제한된 device 집합만 시작할 수 있습니다. 따라서 system은 한 번에 runtime idle로 머무를 수 있는 시간보다 sleep state에 훨씬 오래 머무를 수 있는 경우가 많습니다. 이 때문에 대체로 runtime idle 상태를 유지하는 것보다 sleep state를 사용할 때 system이 더 적은 energy를 소비합니다.
사용 시나리오에 따른 선택
48-56두 power management 전략은 서로 다른 사용 시나리오를 다룹니다. 사용자가 앞으로 system을 사용하지 않을 것임을 나타내면, 예를 들어 laptop lid를 닫으면 그 시점에 sleep state로 들어가는 편이 적절합니다.
반대로 사용자가 단순히 laptop keyboard에서 잠시 자리를 비운 경우에는 언제든 돌아와 system에 즉시 접근하기를 원할 수 있습니다. 따라서 working state를 유지하고 idle이 되면 working-state power management를 사용하는 편이 적절합니다.
요약과 해설
strategies.rst:1-56Linux power management는 system 전체를 멈추는 sleep 전략과, system을 계속 사용할 수 있게 둔 채 component별 상태를 조정하는 working-state 전략을 함께 사용합니다.
Sleep은 더 긴 비사용 구간에서 energy를 크게 줄이는 데 유리하고, runtime idle은 빠른 응답이 필요한 짧은 idle 구간에 유리합니다.