zram: describe device attrs in documentation
Briefly describe exported device stat attrs in zram documentation. We will eventually get rid of per-stat sysfs nodes and, thus, clean up Documentation/ABI/testing/sysfs-block-zram file, which is the only source of information about device sysfs nodes. Add `num_migrated' description, since there is no independent `num_migrated' sysfs node (and no corresponding sysfs-block-zram entry), it will be exported via zram<id>/mm_stat file. At this point we can provide minimal description, because sysfs-block-zram still contains detailed information. Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
8811a9421b
commit
77ba015f9d
1 changed files with 34 additions and 14 deletions
|
@ -98,20 +98,40 @@ size of the disk when not in use so a huge zram is wasteful.
|
||||||
mount /dev/zram1 /tmp
|
mount /dev/zram1 /tmp
|
||||||
|
|
||||||
7) Stats:
|
7) Stats:
|
||||||
Per-device statistics are exported as various nodes under
|
Per-device statistics are exported as various nodes under /sys/block/zram<id>/
|
||||||
/sys/block/zram<id>/
|
|
||||||
disksize
|
A brief description of exported device attritbutes. For more details please
|
||||||
num_reads
|
read Documentation/ABI/testing/sysfs-block-zram.
|
||||||
num_writes
|
|
||||||
failed_reads
|
Name access description
|
||||||
failed_writes
|
---- ------ -----------
|
||||||
invalid_io
|
disksize RW show and set the device's disk size
|
||||||
notify_free
|
initstate RO shows the initialization state of the device
|
||||||
zero_pages
|
reset WO trigger device reset
|
||||||
orig_data_size
|
num_reads RO the number of reads
|
||||||
compr_data_size
|
failed_reads RO the number of failed reads
|
||||||
mem_used_total
|
num_write RO the number of writes
|
||||||
mem_used_max
|
failed_writes RO the number of failed writes
|
||||||
|
invalid_io RO the number of non-page-size-aligned I/O requests
|
||||||
|
max_comp_streams RW the number of possible concurrent compress operations
|
||||||
|
comp_algorithm RW show and change the compression algorithm
|
||||||
|
notify_free RO the number of notifications to free pages (either
|
||||||
|
slot free notifications or REQ_DISCARD requests)
|
||||||
|
zero_pages RO the number of zero filled pages written to this disk
|
||||||
|
orig_data_size RO uncompressed size of data stored in this disk
|
||||||
|
compr_data_size RO compressed size of data stored in this disk
|
||||||
|
mem_used_total RO the amount of memory allocated for this disk
|
||||||
|
mem_used_max RW the maximum amount memory zram have consumed to
|
||||||
|
store compressed data
|
||||||
|
mem_limit RW the maximum amount of memory ZRAM can use to store
|
||||||
|
the compressed data
|
||||||
|
num_migrated RO the number of objects migrated migrated by compaction
|
||||||
|
|
||||||
|
|
||||||
|
File /sys/block/zram<id>/stat
|
||||||
|
|
||||||
|
Represents block layer statistics. Read Documentation/block/stat.txt for
|
||||||
|
details.
|
||||||
|
|
||||||
8) Deactivate:
|
8) Deactivate:
|
||||||
swapoff /dev/zram0
|
swapoff /dev/zram0
|
||||||
|
|
Loading…
Add table
Reference in a new issue