요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Automatic and manual modes
sysfs-kernel-mm-mempolicy-weighted-interleave:29-54Bandwidth data를 사용해 boot·hotplug에서 weights를 재계산하는 auto mode와 user-controlled manual mode의 전환·fallback을 설명합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
1
What: /sys/kernel/mm/mempolicy/weighted_interleave/
2
Date: January 2024
3
Contact: Linux memory management mailing list <[email protected]>
4
Description: Configuration Interface for the Weighted Interleave policy
6
What: /sys/kernel/mm/mempolicy/weighted_interleave/nodeN
7
Date: January 2024
8
Contact: Linux memory management mailing list <[email protected]>
9
Description: Weight configuration interface for nodeN
11
The interleave weight for a memory node (N). These weights are
12
utilized by tasks which have set their mempolicy to
13
MPOL_WEIGHTED_INTERLEAVE.
15
These weights only affect new allocations, and changes at runtime
16
will not cause migrations on already allocated pages.
18
The minimum weight for a node is always 1.
20
Minimum weight: 1
21
Maximum weight: 255
23
Writing invalid values (i.e. any values not in [1,255],
24
empty string, ...) will return -EINVAL.
26
Changing the weight to a valid value will automatically
27
switch the system to manual mode as well.
29
What: /sys/kernel/mm/mempolicy/weighted_interleave/auto
30
Date: May 2025
31
Contact: Linux memory management mailing list <[email protected]>
32
Description: Auto-weighting configuration interface
34
Configuration mode for weighted interleave. 'true' indicates
35
that the system is in auto mode, and a 'false' indicates that
36
the system is in manual mode.
38
In auto mode, all node weights are re-calculated and overwritten
39
(visible via the nodeN interfaces) whenever new bandwidth data
40
is made available during either boot or hotplug events.
42
In manual mode, node weights can only be updated by the user.
43
Note that nodes that are onlined with previously set weights
44
will reuse those weights. If they were not previously set or
45
are onlined with missing bandwidth data, the weights will use
46
a default weight of 1.
48
Writing any true value string (e.g. Y or 1) will enable auto
49
mode, while writing any false value string (e.g. N or 0) will
50
enable manual mode. All other strings are ignored and will
51
return -EINVAL.
53
Writing a new weight to a node directly via the nodeN interface
54
will also automatically switch the system to manual mode.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Weighted weighted interleave
1-5| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/kernel/mm/mempolicy/weighted_interleave |
| Date | 2024년 1월 |
| Contact | Linux memory management mailing list <[email protected]> |
| Description | Weighted Interleave policy의 configuration interface입니다. |
Weighted nodeN
6-28| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/kernel/mm/mempolicy/weighted_interleave/nodeN |
| Date | 2024년 1월 |
| Contact | Linux memory management mailing list <[email protected]> |
| Description | Memory node `N`의 interleave weight를 설정합니다. 이 weights는 mempolicy를 `MPOL_WEIGHTED_INTERLEAVE`로 설정한 tasks가 사용합니다. New allocations에만 영향을 주며 runtime 변경은 이미 allocated된 pages를 migrate하지 않습니다. Node minimum weight는 항상 `1`이고 valid range는 `1..255`입니다. `[1,255]` 밖의 값이나 empty string 같은 invalid values를 쓰면 `-EINVAL`을 반환합니다. Valid weight를 쓰면 system이 자동으로 manual mode로 전환됩니다. |
PropertyValue
Policy userMPOL_WEIGHTED_INTERLEAVE tasks
Minimum1
Maximum255
Invalid input-EINVAL
Existing pagesNo migration
Direct nodeN writeSwitch to manual mode
Node별 weight는 새 allocations의 interleave 비율에만 영향을 줍니다.
Weighted auto
29-54| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/kernel/mm/mempolicy/weighted_interleave/auto |
| Date | 2025년 5월 |
| Contact | Linux memory management mailing list <[email protected]> |
| Description | Auto-weighting configuration interface입니다. `true`는 auto mode, `false`는 manual mode입니다. Auto mode에서는 boot 또는 hotplug event 중 new bandwidth data가 제공될 때 모든 node weights를 다시 계산하고 overwrite하며 `nodeN` interfaces에 표시합니다. Manual mode에서는 user만 weights를 update할 수 있습니다. 이전에 설정한 weight가 있는 node가 online되면 그 값을 재사용하고, 이전 값이 없거나 bandwidth data 없이 online되면 default weight `1`을 사용합니다. `Y` 또는 `1` 같은 true value string은 auto mode, `N` 또는 `0` 같은 false value string은 manual mode를 enable합니다. 다른 strings는 무시하고 `-EINVAL`을 반환합니다. `nodeN`에 새 weight를 직접 쓰는 경우에도 system이 manual mode로 자동 전환됩니다. |
ModeInputWeight updates
Autotrue, Y, 1Recalculate on boot/hotplug bandwidth data
Manualfalse, N, 0User updates only
FallbackMissing prior weight or bandwidthDefault weight 1
Bandwidth-driven auto calculation과 user-controlled manual weights를 비교합니다.
Per-node allocation weights
sysfs-kernel-mm-mempolicy-weighted-interleave:1-28MPOL_WEIGHTED_INTERLEAVE tasks의 새 allocations에 적용할 node별 1..255 weight와 invalid-input 동작을 정의합니다.