요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Write-back cache allocation policy
sysfs-class-bdi:33-134평균 writeout 속도 기반 cache share에 percentage·백만분율·byte 단위 최소/최대 제한을 적용하고 strict_limit과 stable_pages_required를 제공합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
1
What: /sys/class/bdi/<bdi>/
2
Date: January 2008
3
Contact: Peter Zijlstra <a.p.zijlstra@chello.nl>
4
Description:
6
Provide a place in sysfs for the backing_dev_info object. This allows
7
setting and retrieving various BDI specific variables.
9
The <bdi> identifier can be either of the following:
11
MAJOR:MINOR
13
Device number for block devices, or value of st_dev on
14
non-block filesystems which provide their own BDI, such as NFS
15
and FUSE.
17
MAJOR:MINOR-fuseblk
19
Value of st_dev on fuseblk filesystems.
21
default
23
The default backing dev, used for non-block device backed
24
filesystems which do not provide their own BDI.
26
What: /sys/class/bdi/<bdi>/read_ahead_kb
27
Date: January 2008
28
Contact: Peter Zijlstra <a.p.zijlstra@chello.nl>
29
Description:
30
Size of the read-ahead window in kilobytes
32
(read-write)
33
What: /sys/class/bdi/<bdi>/min_ratio
34
Date: January 2008
35
Contact: Peter Zijlstra <a.p.zijlstra@chello.nl>
36
Description:
37
Under normal circumstances each device is given a part of the
38
total write-back cache that relates to its current average
39
writeout speed in relation to the other devices.
41
The 'min_ratio' parameter allows assigning a minimum
42
percentage of the write-back cache to a particular device.
43
For example, this is useful for providing a minimum QoS.
45
(read-write)
47
What: /sys/class/bdi/<bdi>/min_ratio_fine
48
Date: November 2022
49
Contact: Stefan Roesch <shr@devkernel.io>
50
Description:
51
Under normal circumstances each device is given a part of the
52
total write-back cache that relates to its current average
53
writeout speed in relation to the other devices.
55
The 'min_ratio_fine' parameter allows assigning a minimum reserve
56
of the write-back cache to a particular device. The value is
57
expressed as part of 1 million. For example, this is useful for
58
providing a minimum QoS.
60
(read-write)
62
What: /sys/class/bdi/<bdi>/max_ratio
63
Date: January 2008
64
Contact: Peter Zijlstra <a.p.zijlstra@chello.nl>
65
Description:
66
Allows limiting a particular device to use not more than the
67
given percentage of the write-back cache. This is useful in
68
situations where we want to avoid one device taking all or
69
most of the write-back cache. For example in case of an NFS
70
mount that is prone to get stuck, or a FUSE mount which cannot
71
be trusted to play fair.
73
(read-write)
75
What: /sys/class/bdi/<bdi>/max_ratio_fine
76
Date: November 2022
77
Contact: Stefan Roesch <shr@devkernel.io>
78
Description:
79
Allows limiting a particular device to use not more than the
80
given value of the write-back cache. The value is given as part
81
of 1 million. This is useful in situations where we want to avoid
82
one device taking all or most of the write-back cache. For example
83
in case of an NFS mount that is prone to get stuck, or a FUSE mount
84
which cannot be trusted to play fair.
86
(read-write)
88
What: /sys/class/bdi/<bdi>/min_bytes
89
Date: October 2022
90
Contact: Stefan Roesch <shr@devkernel.io>
91
Description:
92
Under normal circumstances each device is given a part of the
93
total write-back cache that relates to its current average
94
writeout speed in relation to the other devices.
96
The 'min_bytes' parameter allows assigning a minimum
97
percentage of the write-back cache to a particular device
98
expressed in bytes.
99
For example, this is useful for providing a minimum QoS.
101
(read-write)
103
What: /sys/class/bdi/<bdi>/max_bytes
104
Date: October 2022
105
Contact: Stefan Roesch <shr@devkernel.io>
106
Description:
107
Allows limiting a particular device to use not more than the
108
given 'max_bytes' of the write-back cache. This is useful in
109
situations where we want to avoid one device taking all or
110
most of the write-back cache. For example in case of an NFS
111
mount that is prone to get stuck, a FUSE mount which cannot be
112
trusted to play fair, or a nbd device.
114
(read-write)
116
What: /sys/class/bdi/<bdi>/strict_limit
117
Date: October 2022
118
Contact: Stefan Roesch <shr@devkernel.io>
119
Description:
120
Forces per-BDI checks for the share of given device in the write-back
121
cache even before the global background dirty limit is reached. This
122
is useful in situations where the global limit is much higher than
123
affordable for given relatively slow (or untrusted) device. Turning
124
strictlimit on has no visible effect if max_ratio is equal to 100%.
126
(read-write)
127
What: /sys/class/bdi/<bdi>/stable_pages_required
128
Date: January 2008
129
Contact: Peter Zijlstra <a.p.zijlstra@chello.nl>
130
Description:
131
If set, the backing device requires that all pages comprising a write
132
request must not be changed until writeout is complete.
134
(read-only)
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Backing device information directory
1-24| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/bdi/<bdi>/ |
| Date | 2008년 1월 |
| Contact | Peter Zijlstra <a.p.zijlstra@chello.nl> |
| Description | backing_dev_info object를 위한 sysfs 위치를 제공하며 여러 BDI-specific variable을 설정하고 가져올 수 있게 합니다. <bdi> identifier는 아래 세 형태 중 하나입니다. |
형식의미
MAJOR:MINORBlock device의 device number, 또는 NFS·FUSE처럼 자체 BDI를 제공하는 non-block filesystem의 st_dev 값
MAJOR:MINOR-fuseblkfuseblk filesystem의 st_dev 값
default자체 BDI를 제공하지 않는 non-block-device-backed filesystem이 사용하는 기본 backing device
Block device, 자체 BDI를 제공하는 filesystem, fuseblk와 기본 backing device를 식별하는 규칙입니다.
BDI read-ahead window
26-32| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/bdi/<bdi>/read_ahead_kb |
| Date | 2008년 1월 |
| Contact | Peter Zijlstra <a.p.zijlstra@chello.nl> |
| Description | Read-ahead window 크기를 kilobyte 단위로 지정합니다. 읽기와 쓰기를 모두 지원합니다. |
최소 write-back cache 비율
33-45| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/bdi/<bdi>/min_ratio |
| Date | 2008년 1월 |
| Contact | Peter Zijlstra <a.p.zijlstra@chello.nl> |
| Description | 일반적으로 각 device에는 다른 device와 비교한 현재 평균 writeout 속도에 비례해 전체 write-back cache의 일부가 할당됩니다. min_ratio는 특정 device에 write-back cache의 최소 percentage를 할당할 수 있게 하며 최소 QoS를 제공할 때 유용합니다. 읽기와 쓰기를 모두 지원합니다. |
백만분율 최소 write-back reserve
47-60| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/bdi/<bdi>/min_ratio_fine |
| Date | 2022년 11월 |
| Contact | Stefan Roesch <shr@devkernel.io> |
| Description | 일반적으로 각 device에는 다른 device와 비교한 현재 평균 writeout 속도에 비례해 전체 write-back cache의 일부가 할당됩니다. min_ratio_fine은 특정 device에 write-back cache의 최소 reserve를 할당하며 값은 1 million의 일부로 표현합니다. 최소 QoS 제공에 유용합니다. 읽기와 쓰기를 모두 지원합니다. |
최대 write-back cache 비율
62-73| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/bdi/<bdi>/max_ratio |
| Date | 2008년 1월 |
| Contact | Peter Zijlstra <a.p.zijlstra@chello.nl> |
| Description | 특정 device가 write-back cache의 주어진 percentage보다 많이 사용하지 못하도록 제한합니다. 멈추기 쉬운 NFS mount나 공정하게 동작한다고 신뢰할 수 없는 FUSE mount처럼 한 device가 write-back cache 전체 또는 대부분을 차지하지 않게 할 때 유용합니다. 읽기와 쓰기를 모두 지원합니다. |
백만분율 최대 write-back 제한
75-86| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/bdi/<bdi>/max_ratio_fine |
| Date | 2022년 11월 |
| Contact | Stefan Roesch <shr@devkernel.io> |
| Description | 특정 device가 write-back cache의 주어진 값보다 많이 사용하지 못하도록 제한하며 값은 1 million의 일부로 표현합니다. 멈추기 쉬운 NFS mount나 공정하게 동작한다고 신뢰할 수 없는 FUSE mount가 write-back cache 전체 또는 대부분을 차지하지 않게 할 때 유용합니다. 읽기와 쓰기를 모두 지원합니다. |
Byte 단위 최소 write-back reserve
88-101| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/bdi/<bdi>/min_bytes |
| Date | 2022년 10월 |
| Contact | Stefan Roesch <shr@devkernel.io> |
| Description | 일반적으로 각 device에는 다른 device와 비교한 현재 평균 writeout 속도에 비례해 전체 write-back cache의 일부가 할당됩니다. min_bytes는 특정 device에 write-back cache의 최소 share를 byte로 표현해 할당할 수 있게 하며 최소 QoS 제공에 유용합니다. 읽기와 쓰기를 모두 지원합니다. |
Byte 단위 최대 write-back 제한
103-114| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/bdi/<bdi>/max_bytes |
| Date | 2022년 10월 |
| Contact | Stefan Roesch <shr@devkernel.io> |
| Description | 특정 device가 write-back cache의 주어진 max_bytes보다 많이 사용하지 못하도록 제한합니다. 멈추기 쉬운 NFS mount, 공정하게 동작한다고 신뢰할 수 없는 FUSE mount 또는 nbd device가 write-back cache 전체나 대부분을 차지하지 않게 할 때 유용합니다. 읽기와 쓰기를 모두 지원합니다. |
Global dirty limit 전 per-BDI 강제 검사
116-126| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/bdi/<bdi>/strict_limit |
| Date | 2022년 10월 |
| Contact | Stefan Roesch <shr@devkernel.io> |
| Description | Global background dirty limit에 도달하기 전에도 write-back cache에서 해당 device가 차지하는 share를 per-BDI로 강제 검사합니다. Global limit이 비교적 느리거나 신뢰할 수 없는 device가 감당할 수 있는 수준보다 훨씬 높을 때 유용합니다. max_ratio가 100%이면 strict_limit을 켜도 눈에 보이는 효과가 없습니다. 읽기와 쓰기를 모두 지원합니다. |
속성단위 또는 역할
min_ratio / max_ratioPercentage
min_ratio_fine / max_ratio_fine1 million의 일부
min_bytes / max_bytesBytes
strict_limitGlobal background dirty limit 이전에도 per-BDI share 검사
최소·최대 cache share 속성이 사용하는 단위와 strict enforcement의 역할입니다.
Writeout 중 stable page 요구
127-134| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/bdi/<bdi>/stable_pages_required |
| Date | 2008년 1월 |
| Contact | Peter Zijlstra <a.p.zijlstra@chello.nl> |
| Description | 설정되어 있으면 backing device는 write request를 구성하는 모든 page가 writeout이 완료될 때까지 변경되지 않아야 합니다. Read-only 속성입니다. |
BDI identity and read-ahead
sysfs-class-bdi:1-32Block·filesystem BDI identifier 세 형식과 kilobyte 단위 read-ahead window를 정의합니다.