요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=====================================================================
Platform Profile Selection (e.g. /sys/firmware/acpi/platform_profile)
=====================================================================
On modern systems the platform performance, temperature, fan and other
hardware related characteristics are often dynamically configurable. The
platform configuration is often automatically adjusted to the current
conditions by some automatic mechanism (which may very well live outside
the kernel).
These auto platform adjustment mechanisms often can be configured with
one of several platform profiles, with either a bias towards low power
operation or towards performance.
The purpose of the platform_profile attribute is to offer a generic sysfs
API for selecting the platform profile of these automatic mechanisms.
Note that this API is only for selecting the platform profile, it is
NOT a goal of this API to allow monitoring the resulting performance
characteristics. Monitoring performance is best done with device/vendor
specific tools, e.g. turbostat.
Specifically, when selecting a high performance profile the actual achieved
performance may be limited by various factors such as: the heat generated
by other components, room temperature, free air flow at the bottom of a
laptop, etc. It is explicitly NOT a goal of this API to let userspace know
about any sub-optimal conditions which are impeding reaching the requested
performance level.
Since numbers on their own cannot represent the multiple variables that a
profile will adjust (power consumption, heat generation, etc) this API
uses strings to describe the various profiles. To make sure that userspace
gets a consistent experience the sysfs-platform_profile ABI document defines
a fixed set of profile names. Drivers *must* map their internal profile
representation onto this fixed set.
If there is no good match when mapping then a new profile name may be
added. Drivers which wish to introduce new profile names must:
1. Explain why the existing profile names cannot be used.
2. Add the new profile name, along with a clear description of the
expected behaviour, to the sysfs-platform_profile ABI documentation.
"Custom" profile support
========================
The platform_profile class also supports profiles advertising a "custom"
profile. This is intended to be set by drivers when the settings in the
driver have been modified in a way that a standard profile doesn't represent
the current state.
Multiple driver support
=======================
When multiple drivers on a system advertise a platform profile handler, the
platform profile handler core will only advertise the profiles that are
common between all drivers to the ``/sys/firmware/acpi`` interfaces.
This is to ensure there is no ambiguity on what the profile names mean when
all handlers don't support a profile.
Individual drivers will register a 'platform_profile' class device that has
similar semantics as the ``/sys/firmware/acpi/platform_profile`` interface.
To discover which driver is associated with a platform profile handler the
user can read the ``name`` attribute of the class device.
To discover available profiles from the class interface the user can read the
``choices`` attribute.
If a user wants to select a profile for a specific driver, they can do so
by writing to the ``profile`` attribute of the driver's class device.
This will allow users to set different profiles for different drivers on the
same system. If the selected profile by individual drivers differs the
platform profile handler core will display the profile 'custom' to indicate
that the profiles are not the same.
While the ``platform_profile`` attribute has the value ``custom``, writing a
common profile from ``platform_profile_choices`` to the platform_profile
attribute of the platform profile handler core will set the profile for all
drivers.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
platform_profile API의 목적
1-43현대 시스템은 성능, 온도, fan 등 하드웨어 특성을 동적으로 설정할 수 있고, 종종 커널 밖에 있을 수도 있는 자동 메커니즘이 현재 조건에 맞춰 구성을 조정합니다.
자동 조정 메커니즘은 저전력 또는 성능에 가중치를 두는 여러 platform profile 중 하나로 설정할 수 있습니다. `platform_profile` attribute는 이런 메커니즘의 profile을 선택하는 범용 sysfs API입니다.
이 API는 profile 선택만 담당합니다. 실제 성능 특성을 감시하는 것이 목적이 아니며, 모니터링에는 `turbostat` 같은 장치·vendor 전용 도구가 적합합니다.
high-performance profile을 선택해도 다른 부품의 발열, 실내 온도, 노트북 하단 공기 흐름 같은 요인 때문에 실제 성능이 제한될 수 있습니다. 요청 성능을 방해하는 최적 이하 조건을 사용자 공간에 알리는 것도 이 API의 목적이 아닙니다.
profile은 전력 소비와 발열 등 여러 변수를 함께 조정하므로 숫자 하나로 표현할 수 없습니다. API는 문자열 profile 이름을 사용하며 `sysfs-platform_profile` ABI가 고정 이름 집합을 정의합니다. driver는 내부 표현을 반드시 이 집합에 mapping해야 합니다.
기존 고정 이름과 맞지 않을 때만 ABI를 확장합니다.
=====================================================================
Platform Profile Selection (e.g. /sys/firmware/acpi/platform_profile)
=====================================================================
On modern systems the platform performance, temperature, fan and other
hardware related characteristics are often dynamically configurable. The
platform configuration is often automatically adjusted to the current
conditions by some automatic mechanism (which may very well live outside
the kernel).
These auto platform adjustment mechanisms often can be configured with
one of several platform profiles, with either a bias towards low power
operation or towards performance.
The purpose of the platform_profile attribute is to offer a generic sysfs
API for selecting the platform profile of these automatic mechanisms.
Note that this API is only for selecting the platform profile, it is
NOT a goal of this API to allow monitoring the resulting performance
characteristics. Monitoring performance is best done with device/vendor
specific tools, e.g. turbostat.
Specifically, when selecting a high performance profile the actual achieved
performance may be limited by various factors such as: the heat generated
by other components, room temperature, free air flow at the bottom of a
laptop, etc. It is explicitly NOT a goal of this API to let userspace know
about any sub-optimal conditions which are impeding reaching the requested
performance level.
Since numbers on their own cannot represent the multiple variables that a
profile will adjust (power consumption, heat generation, etc) this API
uses strings to describe the various profiles. To make sure that userspace
gets a consistent experience the sysfs-platform_profile ABI document defines
a fixed set of profile names. Drivers *must* map their internal profile
representation onto this fixed set.
If there is no good match when mapping then a new profile name may be
added. Drivers which wish to introduce new profile names must:
1. Explain why the existing profile names cannot be used.
2. Add the new profile name, along with a clear description of the
expected behaviour, to the sysfs-platform_profile ABI documentation.
custom profile
44-50platform_profile class는 `custom` profile 광고도 지원합니다. driver 설정이 표준 profile로 현재 상태를 나타낼 수 없는 방식으로 변경됐을 때 driver가 이 값을 설정합니다.
"Custom" profile support
========================
The platform_profile class also supports profiles advertising a "custom"
profile. This is intended to be set by drivers when the settings in the
driver have been modified in a way that a standard profile doesn't represent
the current state.
여러 driver 지원
51-80여러 driver가 platform profile handler를 제공하면 core는 모든 driver가 공통으로 지원하는 profile만 `/sys/firmware/acpi` 인터페이스에 노출합니다. 모든 handler가 지원하지 않는 이름의 의미가 모호해지는 일을 막기 위해서입니다.
각 driver는 `/sys/firmware/acpi/platform_profile`과 비슷한 의미를 가진 `platform_profile` class device를 등록합니다.
driver 식별, 선택지 조회와 개별 설정을 제공합니다.
서로 다른 driver에 서로 다른 profile을 설정할 수 있습니다. 개별 선택이 서로 다르면 core는 profile이 같지 않음을 나타내기 위해 `custom`을 표시합니다.
core의 `platform_profile`이 `custom`일 때 `platform_profile_choices`에 있는 공통 profile을 core의 `platform_profile` attribute에 쓰면 모든 driver가 그 profile로 설정됩니다.
공통 노출과 개별 설정을 분리합니다.
Multiple driver support
=======================
When multiple drivers on a system advertise a platform profile handler, the
platform profile handler core will only advertise the profiles that are
common between all drivers to the ``/sys/firmware/acpi`` interfaces.
This is to ensure there is no ambiguity on what the profile names mean when
all handlers don't support a profile.
Individual drivers will register a 'platform_profile' class device that has
similar semantics as the ``/sys/firmware/acpi/platform_profile`` interface.
To discover which driver is associated with a platform profile handler the
user can read the ``name`` attribute of the class device.
To discover available profiles from the class interface the user can read the
``choices`` attribute.
If a user wants to select a profile for a specific driver, they can do so
by writing to the ``profile`` attribute of the driver's class device.
This will allow users to set different profiles for different drivers on the
same system. If the selected profile by individual drivers differs the
platform profile handler core will display the profile 'custom' to indicate
that the profiles are not the same.
While the ``platform_profile`` attribute has the value ``custom``, writing a
common profile from ``platform_profile_choices`` to the platform_profile
attribute of the platform profile handler core will set the profile for all
drivers.
요약·해설
sysfs-platform_profile.rst:1-80platform_profile은 성능 결과를 보장하거나 감시하는 API가 아니라 자동 조정 정책을 선택하는 API입니다. 다중 handler에서는 공통 profile만 core에 노출되고, driver별 선택이 달라지면 `custom`이 전체 상태를 나타냅니다.