diff options
author | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | 2015-04-15 19:16:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 19:35:21 -0400 |
commit | 8f7d282c717acaae25245c61b6b60e8995ec4ef4 (patch) | |
tree | 619cd0a9f363bfccf911f0fe2fe892a5961e9f9b /Documentation/blockdev | |
parent | 4f2109f60881585dc04fa0b5657a60556576625c (diff) |
zram: deprecate zram attrs sysfs nodes
Add Documentation/ABI/obsolete/sysfs-block-zram file and list obsolete and
deprecated attributes there. The patch also adds additional information
to zram documentation and describes the basic strategy:
- the existing RW nodes will be downgraded to WO nodes (in 4.11)
- deprecated RO sysfs nodes will eventually be removed (in 4.11)
Users will be additionally notified about deprecated attr usage by
pr_warn_once() (added to every deprecated attr _show()), as suggested by
Minchan Kim.
User space is advised to use zram<id>/stat, zram<id>/io_stat and
zram<id>/mm_stat files.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reported-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/blockdev')
-rw-r--r-- | Documentation/blockdev/zram.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/blockdev/zram.txt b/Documentation/blockdev/zram.txt index 7920f4026d36..48a183e29988 100644 --- a/Documentation/blockdev/zram.txt +++ b/Documentation/blockdev/zram.txt | |||
@@ -128,6 +128,22 @@ mem_limit RW the maximum amount of memory ZRAM can use to store | |||
128 | num_migrated RO the number of objects migrated migrated by compaction | 128 | num_migrated RO the number of objects migrated migrated by compaction |
129 | 129 | ||
130 | 130 | ||
131 | WARNING | ||
132 | ======= | ||
133 | per-stat sysfs attributes are considered to be deprecated. | ||
134 | The basic strategy is: | ||
135 | -- the existing RW nodes will be downgraded to WO nodes (in linux 4.11) | ||
136 | -- deprecated RO sysfs nodes will eventually be removed (in linux 4.11) | ||
137 | |||
138 | The list of deprecated attributes can be found here: | ||
139 | Documentation/ABI/obsolete/sysfs-block-zram | ||
140 | |||
141 | Basically, every attribute that has its own read accessible sysfs node | ||
142 | (e.g. num_reads) *AND* is accessible via one of the stat files (zram<id>/stat | ||
143 | or zram<id>/io_stat or zram<id>/mm_stat) is considered to be deprecated. | ||
144 | |||
145 | User space is advised to use the following files to read the device statistics. | ||
146 | |||
131 | File /sys/block/zram<id>/stat | 147 | File /sys/block/zram<id>/stat |
132 | 148 | ||
133 | Represents block layer statistics. Read Documentation/block/stat.txt for | 149 | Represents block layer statistics. Read Documentation/block/stat.txt for |