Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

zram: document writeback_batch_size

Add missing writeback_batch_size documentation.

Link: https://lkml.kernel.org/r/20251201094754.4149975-4-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Brian Geffon <bgeffon@google.com>
Cc: David Stevens <stevensd@google.com>
Cc: Minchan Kim <minchan@google.com>
Cc: Richard Chang <richardycc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Sergey Senozhatsky and committed by
Andrew Morton
2502673a 4c1d6138

+17 -1
+7
Documentation/ABI/testing/sysfs-block-zram
··· 157 157 Description: 158 158 The writeback_compressed device atrribute toggles compressed 159 159 writeback feature. 160 + 161 + What: /sys/block/zram<id>/writeback_batch_size 162 + Date: November 2025 163 + Contact: Sergey Senozhatsky <senozhatsky@chromium.org> 164 + Description: 165 + The writeback_batch_size device atrribute sets the maximum 166 + number of in-flight writeback operations.
+10 -1
Documentation/admin-guide/blockdev/zram.rst
··· 214 214 writeback_limit WO specifies the maximum amount of write IO zram 215 215 can write out to backing device as 4KB unit 216 216 writeback_limit_enable RW show and set writeback_limit feature 217 + writeback_batch_size RW show and set maximum number of in-flight 218 + writeback operations 217 219 writeback_compressed RW show and set compressed writeback feature 218 220 comp_algorithm RW show and change the compression algorithm 219 221 algorithm_params WO setup compression algorithm parameters ··· 224 222 backing_dev RW set up backend storage for zram to write out 225 223 idle WO mark allocated slot as idle 226 224 ====================== ====== =============================================== 227 - 228 225 229 226 User space is advised to use the following files to read the device statistics. 230 227 ··· 447 446 448 447 Note that this feature should be configured before the `zramX` device is 449 448 initialized. 449 + 450 + Depending on backing device storage type, writeback operation may benefit 451 + from a higher number of in-flight write requests (batched writes). The 452 + number of maximum in-flight writeback operations can be configured via 453 + `writeback_batch_size` attribute. To change the default value (which is 32), 454 + execute:: 455 + 456 + $ echo 64 > /sys/block/zramX/writeback_batch_size 450 457 451 458 If admin wants to measure writeback count in a certain period, they could 452 459 know it via /sys/block/zram0/bd_stat's 3rd column.