← Documents Documentation/ABI/testing/sysfs-class-zram GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

zram control class sysfs ABI

zram-control class와 동적 /dev/zram device 추가·제거를 수행하는 hot_add·hot_remove를 설명합니다.

Source pathDocumentation/ABI/testing/sysfs-class-zram
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

zram control class

sysfs-class-zram:1-8

zram-control class subdirectory는 zram device class에 속합니다.

Dynamic zram device creation

sysfs-class-zram:9-17

hot_add를 읽으면 새 zram device를 추가하고 /dev/zram<id>에 사용할 device ID 또는 error code를 반환합니다.

Dynamic zram device removal

sysfs-class-zram:18-24

hot_remove에 device_id X를 쓰면 해당 /dev/zramX device를 제거합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /sys/class/zram-control/
2 Date: August 2015
3 KernelVersion: 4.2
4 Contact: Sergey Senozhatsky <[email protected]>
5 Description:
6 The zram-control/ class sub-directory belongs to zram
7 device class
8
9 What: /sys/class/zram-control/hot_add
10 Date: August 2015
11 KernelVersion: 4.2
12 Contact: Sergey Senozhatsky <[email protected]>
13 Description:
14 RO attribute. Read operation will cause zram to add a new
15 device and return its device id back to user (so one can
16 use /dev/zram<id>), or error code.
17
18 What: /sys/class/zram-control/hot_remove
19 Date: August 2015
20 KernelVersion: 4.2
21 Contact: Sergey Senozhatsky <[email protected]>
22 Description:
23 WO attribute. Remove a specific /dev/zramX device, where X
24 is a device_id provided by user.
25

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

zram control class

1-8
항목한국어 전문 번역
What/sys/class/zram-control/
Date2015년 8월
KernelVersion4.2
ContactSergey Senozhatsky <[email protected]>
Descriptionzram-control/ class subdirectory는 zram device class에 속합니다.

Add a zram device

9-17
항목한국어 전문 번역
What/sys/class/zram-control/hot_add
Date2015년 8월
KernelVersion4.2
ContactSergey Senozhatsky <[email protected]>
DescriptionRO attribute입니다. Read operation은 zram이 새 device를 추가하게 하고 device ID를 user에게 반환하여 /dev/zram<id>를 사용할 수 있게 하며, 실패하면 error code를 반환합니다.

Remove a zram device

18-24
항목한국어 전문 번역
What/sys/class/zram-control/hot_remove
Date2015년 8월
KernelVersion4.2
ContactSergey Senozhatsky <[email protected]>
DescriptionWO attribute입니다. User가 제공한 device_id가 X일 때 특정 /dev/zramX device를 제거합니다.
Dynamic zram device lifecycle
hot_add read새 zram device 생성device ID X 반환/dev/zramX 사용hot_remove에 X write하여 제거

hot_add가 반환한 ID를 device path와 이후 removal에 재사용합니다.