diff options
author | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | 2015-04-15 19:16:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 19:35:21 -0400 |
commit | 4f2109f60881585dc04fa0b5657a60556576625c (patch) | |
tree | 18965ef4da50218fefe6b899b5bdb35f4edb7d5c /Documentation | |
parent | 2f6a3bed7347ee94fe57b3501fddaa646a26d890 (diff) |
zram: export new 'mm_stat' sysfs attrs
Per-device `zram<id>/mm_stat' file provides mm statistics of a particular
zram device in a format similar to block layer statistics. The file
consists of a single line and represents the following stats (separated by
whitespace):
orig_data_size
compr_data_size
mem_used_total
mem_limit
mem_used_max
zero_pages
num_migrated
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>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ABI/testing/sysfs-block-zram | 8 | ||||
-rw-r--r-- | Documentation/blockdev/zram.txt | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/ABI/testing/sysfs-block-zram b/Documentation/ABI/testing/sysfs-block-zram index a7f622f9bcf6..2e69e83bf510 100644 --- a/Documentation/ABI/testing/sysfs-block-zram +++ b/Documentation/ABI/testing/sysfs-block-zram | |||
@@ -158,3 +158,11 @@ Description: | |||
158 | statistics not accounted by block layer. For example, | 158 | statistics not accounted by block layer. For example, |
159 | failed_reads, failed_writes, etc. File format is similar to | 159 | failed_reads, failed_writes, etc. File format is similar to |
160 | block layer statistics file format. | 160 | block layer statistics file format. |
161 | |||
162 | What: /sys/block/zram<id>/mm_stat | ||
163 | Date: August 2015 | ||
164 | Contact: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | ||
165 | Description: | ||
166 | The mm_stat file is read-only and represents device's mm | ||
167 | statistics (orig_data_size, compr_data_size, etc.) in a format | ||
168 | similar to block layer statistics file format. | ||
diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt index 9610be3e9d36..7920f4026d36 100644 --- a/Documentation/blockdev/zram.txt +++ b/Documentation/blockdev/zram.txt | |||
@@ -144,6 +144,18 @@ whitespace: | |||
144 | invalid_io | 144 | invalid_io |
145 | notify_free | 145 | notify_free |
146 | 146 | ||
147 | File /sys/block/zram<id>/mm_stat | ||
148 | |||
149 | The stat file represents device's mm statistics. It consists of a single | ||
150 | line of text and contains the following stats separated by whitespace: | ||
151 | orig_data_size | ||
152 | compr_data_size | ||
153 | mem_used_total | ||
154 | mem_limit | ||
155 | mem_used_max | ||
156 | zero_pages | ||
157 | num_migrated | ||
158 | |||
147 | 8) Deactivate: | 159 | 8) Deactivate: |
148 | swapoff /dev/zram0 | 160 | swapoff /dev/zram0 |
149 | umount /dev/zram1 | 161 | umount /dev/zram1 |