public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* what's cooking in zram for 4.1
@ 2015-05-09  4:21 Sergey Senozhatsky
  2015-05-11 11:38 ` Karel Zak
  2015-05-18  9:36 ` Karel Zak
  0 siblings, 2 replies; 8+ messages in thread
From: Sergey Senozhatsky @ 2015-05-09  4:21 UTC (permalink / raw)
  To: Karel Zak
  Cc: Minchan Kim, Sergey Senozhatsky, Sergey Senozhatsky, linux-kernel,
	util-linux

Hello Karel,

There will be some user-space visible changes in zram 4.1 we'd love to let you know
about.


1) new sysfs node -- /sys/block/zramX/compact

triggers zram memory compaction.


2) zram has deprecated some of the existing stat sysfs attributes. we will
consolidate zramX device's stats in 3 files, rather than having N files (per-stat).

The idea is:
-- the existing RW sysfs device nodes will be downgraded to WO nodes (in linux 4.11)
-- deprecated RO sysfs nodes will eventually be removed (in linux 4.11)


User-space is advised to use the following files:

-- /sys/block/zram<id>/stat

Represents block layer statistics (read Documentation/block/stat.txt for
details).

-- /sys/block/zram<id>/io_stat

The stat file represents device's I/O statistics not accounted by block
layer and, thus, not available in zram<id>/stat file. It consists of a
single line of text and contains the following stats separated by
whitespace:
        failed_reads
        failed_writes
        invalid_io
        notify_free

-- /sys/block/zram<id>/mm_stat

The stat file represents device's mm statistics. It consists of a single
line of text and contains the following stats separated by whitespace:
        orig_data_size
        compr_data_size
        mem_used_total
        mem_limit
        mem_used_max
        zero_pages
        num_migrated

deprecated nodes will be around up until linux 4.11 (approx 2 years from now). in the
meantime, zram will warn (once) should any user space app access any of the deprecated
attrs:
"zram: 30788 (cat) Attribute num_reads (and others) will be removed. See zram documentation."


	-ss

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-05-18 14:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-09  4:21 what's cooking in zram for 4.1 Sergey Senozhatsky
2015-05-11 11:38 ` Karel Zak
2015-05-11 11:56   ` Sergey Senozhatsky
2015-05-18 13:55     ` Minchan Kim
2015-05-18 14:40       ` Sergey Senozhatsky
2015-05-18  9:36 ` Karel Zak
2015-05-18  9:56   ` Sergey Senozhatsky
2015-05-18 13:56     ` Minchan Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox