File tree Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Expand file tree Collapse file tree 3 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -90,3 +90,11 @@ Description:
90
90
device's debugging info useful for kernel developers. Its
91
91
format is not documented intentionally and may change
92
92
anytime without any notice.
93
+
94
+ What: /sys/block/zram<id>/backing_dev
95
+ Date: June 2017
96
+ Contact: Minchan Kim <
[email protected] >
97
+ Description:
98
+ The backing_dev file is read-write and set up backing
99
+ device for zram to write incompressible pages.
100
+ For using, user should enable CONFIG_ZRAM_WRITEBACK.
Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ max_comp_streams RW the number of possible concurrent compress operations
168
168
comp_algorithm RW show and change the compression algorithm
169
169
compact WO trigger memory compaction
170
170
debug_stat RO this file is used for zram debugging purposes
171
+ backing_dev RW set up backend storage for zram to write out
171
172
172
173
173
174
User space is advised to use the following files to read the device statistics.
@@ -231,5 +232,15 @@ line of text and contains the following stats separated by whitespace:
231
232
resets the disksize to zero. You must set the disksize again
232
233
before reusing the device.
233
234
235
+ * Optional Feature
236
+
237
+ = writeback
238
+
239
+ With incompressible pages, there is no memory saving with zram.
240
+ Instead, with CONFIG_ZRAM_WRITEBACK, zram can write incompressible page
241
+ to backing storage rather than keeping it in memory.
242
+ User should set up backing device via /sys/block/zramX/backing_dev
243
+ before disksize setting.
244
+
234
245
Nitin Gupta
235
246
Original file line number Diff line number Diff line change @@ -13,3 +13,15 @@ config ZRAM
13
13
disks and maybe many more.
14
14
15
15
See zram.txt for more information.
16
+
17
+ config ZRAM_WRITEBACK
18
+ bool "Write back incompressible page to backing device"
19
+ depends on ZRAM
20
+ default n
21
+ help
22
+ With incompressible page, there is no memory saving to keep it
23
+ in memory. Instead, write it out to backing device.
24
+ For this feature, admin should set up backing device via
25
+ /sys/block/zramX/backing_dev.
26
+
27
+ See zram.txt for more infomration.
You can’t perform that action at this time.
0 commit comments