<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in sysfs-block-zram</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>4127e13c - zram: remove max_comp_streams device attr</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#4127e13c</link>
        <description>zram: remove max_comp_streams device attrmax_comp_streams device attribute has been defunct since May 2016 whenzram switched to per-CPU compression streams, remove it.Link: https://lkml.kernel.org/r/20250303022425.285971-5-senozhatsky@chromium.orgSigned-off-by: Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;Cc: Hillf Danton &lt;hdanton@sina.com&gt;Cc: Kairui Song &lt;ryncsn@gmail.com&gt;Cc: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;Cc: Yosry Ahmed &lt;yosry.ahmed@linux.dev&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Mon, 03 Mar 2025 02:03:13 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;</dc:creator>
    </item>
<item>
        <title>4eac9321 - zram: introduce algorithm_params device attribute</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#4eac9321</link>
        <description>zram: introduce algorithm_params device attributeThis attribute is used to setup compression algorithms&apos; parameters, so wecan tweak algorithms&apos; characteristics.  At this point only &apos;level&apos; issupported (to be extended in the future).Each call sets up parameters for one particular algorithm, which should bespecified either by the algorithm&apos;s priority or algo name.  This isexpected to be called after corresponding algorithm is selected viacomp_algorithm or recomp_algorithm. echo &quot;priority=0 level=1&quot; &gt; /sys/block/zram0/algorithm_paramsor echo &quot;algo=zstd level=1&quot; &gt; /sys/block/zram0/algorithm_paramsLink: https://lkml.kernel.org/r/20240902105656.1383858-16-senozhatsky@chromium.orgSigned-off-by: Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;Cc: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Nick Terrell &lt;terrelln@fb.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Mon, 02 Sep 2024 10:56:03 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;</dc:creator>
    </item>
<item>
        <title>c959a0e8 - Docs/ABI/zram: document zram recompress sysfs knobs</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#c959a0e8</link>
        <description>Docs/ABI/zram: document zram recompress sysfs knobsDocument zram re-compression sysfs knobs.Link: https://lkml.kernel.org/r/20221115020314.386235-1-senozhatsky@chromium.orgSigned-off-by: Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Tue, 15 Nov 2022 02:03:14 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;senozhatsky@chromium.org&gt;</dc:creator>
    </item>
<item>
        <title>1d69a3f8 - zram: idle writeback fixes and cleanup</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#1d69a3f8</link>
        <description>zram: idle writeback fixes and cleanupThis patch includes some fixes and cleanup for idle-page writeback.1. writeback_limit interfaceNow writeback_limit interface is rather conusing.  For example, oncewriteback limit budget is exausted, admin can see 0 from/sys/block/zramX/writeback_limit which is same semantic with disablewriteback_limit at this moment.  IOW, admin cannot tell that zero camefrom disable writeback limit or exausted writeback limit.To make the interface clear, let&apos;s sepatate enable of writeback limit toanother knob - /sys/block/zram0/writeback_limit_enable* before:  while true :    # to re-enable writeback limit once previous one is used up    echo 0 &gt; /sys/block/zram0/writeback_limit    echo $((200&lt;&lt;20)) &gt; /sys/block/zram0/writeback_limit    ..    .. # used up the writeback limit budget* new  # To enable writeback limit, from the beginning, admin should  # enable it.  echo $((200&lt;&lt;20)) &gt; /sys/block/zram0/writeback_limit  echo 1 &gt; /sys/block/zram/0/writeback_limit_enable  while true :    echo $((200&lt;&lt;20)) &gt; /sys/block/zram0/writeback_limit    ..    .. # used up the writeback limit budgetIt&apos;s much strightforward.2. fix condition check idle/huge writeback mode checkThe mode in writeback_store is not bit opeartion any more so no need touse bit operations.  Furthermore, current condition check is broken inthat it does writeback every pages regardless of huge/idle.3. clean up idle_storeNo need to use goto.[minchan@kernel.org: missed spin_lock_init]  Link: http://lkml.kernel.org/r/20190103001601.GA255139@google.comLink: http://lkml.kernel.org/r/20181224033529.19450-1-minchan@kernel.orgSigned-off-by: Minchan Kim &lt;minchan@kernel.org&gt;Suggested-by: John Dias &lt;joaodias@google.com&gt;Cc: Sergey Senozhatsky &lt;sergey.senozhatsky.work@gmail.com&gt;Cc: John Dias &lt;joaodias@google.com&gt;Cc: Srinivas Paladugu &lt;srnvs@google.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Tue, 08 Jan 2019 23:22:53 +0000</pubDate>
        <dc:creator>Minchan Kim &lt;minchan@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>bb416d18 - zram: writeback throttle</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#bb416d18</link>
        <description>zram: writeback throttleIf there are lots of write IO with flash device, it could have awearout problem of storage. To overcome the problem, admin needsto design write limitation to guarantee flash healthfor entire product life.This patch creates a new knob &quot;writeback_limit&quot; for zram.writeback_limit&apos;s default value is 0 so that it doesn&apos;t limitany writeback. If admin want to measure writeback count in acertain period, he could know it via /sys/block/zram0/bd_stat&apos;s3rd column.If admin want to limit writeback as per-day 400M, he could do itlike below.	MB_SHIFT=20	4K_SHIFT=12	echo $((400&lt;&lt;MB_SHIFT&gt;&gt;4K_SHIFT)) &gt; \		/sys/block/zram0/writeback_limit.If admin want to allow further write again, he could do it like below	echo 0 &gt; /sys/block/zram0/writeback_limitIf admin want to see remaining writeback budget,	cat /sys/block/zram0/writeback_limitThe writeback_limit count will reset whenever you reset zram (e.g., systemreboot, echo 1 &gt; /sys/block/zramX/reset) so keeping how many of writebackhappened until you reset the zram to allocate extra writeback budget innext setting is user&apos;s job.[minchan@kernel.org: v4]  Link: http://lkml.kernel.org/r/20181203024045.153534-8-minchan@kernel.orgLink: http://lkml.kernel.org/r/20181127055429.251614-8-minchan@kernel.orgSigned-off-by: Minchan Kim &lt;minchan@kernel.org&gt;Reviewed-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Cc: Joey Pabalinas &lt;joeypabalinas@gmail.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Fri, 28 Dec 2018 08:36:54 +0000</pubDate>
        <dc:creator>Minchan Kim &lt;minchan@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>23eddf39 - zram: add bd_stat statistics</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#23eddf39</link>
        <description>zram: add bd_stat statisticsbd_stat represents things that happened in the backing device.  Currentlyit supports bd_counts, bd_reads and bd_writes which are helpful tounderstand wearout of flash and memory saving.[minchan@kernel.org: v4]  Link: http://lkml.kernel.org/r/20181203024045.153534-7-minchan@kernel.orgLink: http://lkml.kernel.org/r/20181127055429.251614-7-minchan@kernel.orgSigned-off-by: Minchan Kim &lt;minchan@kernel.org&gt;Reviewed-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Cc: Joey Pabalinas &lt;joeypabalinas@gmail.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Fri, 28 Dec 2018 08:36:51 +0000</pubDate>
        <dc:creator>Minchan Kim &lt;minchan@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>a939888e - zram: support idle/huge page writeback</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#a939888e</link>
        <description>zram: support idle/huge page writebackAdd a new feature &quot;zram idle/huge page writeback&quot;.  In the zram-swap usecase, zram usually has many idle/huge swap pages.  It&apos;s pointless to keepthem in memory (ie, zram).To solve this problem, this feature introduces idle/huge page writeback tothe backing device so the goal is to save more memory space on embeddedsystems.Normal sequence to use idle/huge page writeback feature is as follows,while (1) {        # mark allocated zram slot to idle        echo all &gt; /sys/block/zram0/idle        # leave system working for several hours        # Unless there is no access for some blocks on zram,	# they are still IDLE marked pages.        echo &quot;idle&quot; &gt; /sys/block/zram0/writeback	or/and	echo &quot;huge&quot; &gt; /sys/block/zram0/writeback        # write the IDLE or/and huge marked slot into backing device	# and free the memory.}Per the discussion athttps://lore.kernel.org/lkml/20181122065926.GG3441@jagdpanzerIV/T/#u,This patch removes direct incommpressibe page writeback feature(d2afd25114f4 (&quot;zram: write incompressible pages to backing device&quot;)).Below concerns from Sergey:== &amp;&lt; ==&quot;IDLE writeback&quot; is superior to &quot;incompressible writeback&quot;.&quot;incompressible writeback&quot; is completely unpredictable and uncontrollable;it depens on data patterns and compression algorithms.  While &quot;IDLEwriteback&quot; is predictable.I even suspect, that, *ideally*, we can remove &quot;incompressible writeback&quot;.&quot;IDLE pages&quot; is a super set which also includes &quot;incompressible&quot; pages.So, technically, we still can do &quot;incompressible writeback&quot; from &quot;IDLEwriteback&quot; path; but a much more reasonable one, based on a page idlingperiod.I understand that you want to keep &quot;direct incompressible writeback&quot;around.  ZRAM is especially popular on devices which do suffer from flashwearout, so I can see &quot;incompressible writeback&quot; path becoming a deadcode, long term.== &amp;&lt; ==Below concerns from Minchan:== &amp;&lt; ==My concern is if we enable CONFIG_ZRAM_WRITEBACK in this implementation,both hugepage/idlepage writeck will turn on.  However someuser want toenable only idlepage writeback so we need to introduce turn on/off knobfor hugepage or new CONFIG_ZRAM_IDLEPAGE_WRITEBACK for those usecase.  Idon&apos;t want to make it complicated *if possible*.Long term, I imagine we need to make VM aware of new swap hierarchy alittle bit different with as-is.  For example, first high priority swapcan return -EIO or -ENOCOMP, swap try to fallback to next lower priorityswap device.  With that, hugepage writeback will work tranparently.So we could regard it as regression because incompressible pages doesn&apos;tgo to backing storage automatically.  Instead, user should do it via &quot;echohuge&quot; &gt; /sys/block/zram/writeback&quot; manually.== &amp;&lt; ==Link: http://lkml.kernel.org/r/20181127055429.251614-6-minchan@kernel.orgSigned-off-by: Minchan Kim &lt;minchan@kernel.org&gt;Reviewed-by: Joey Pabalinas &lt;joeypabalinas@gmail.com&gt;Reviewed-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Fri, 28 Dec 2018 08:36:47 +0000</pubDate>
        <dc:creator>Minchan Kim &lt;minchan@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>e82592c4 - zram: introduce ZRAM_IDLE flag</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#e82592c4</link>
        <description>zram: introduce ZRAM_IDLE flagTo support idle page writeback with upcoming patches, this patchintroduces a new ZRAM_IDLE flag.Userspace can mark zram slots as &quot;idle&quot; via	&quot;echo all &gt; /sys/block/zramX/idle&quot;which marks every allocated zram slot as ZRAM_IDLE.User could see it by /sys/kernel/debug/zram/zram0/block_state.          300    75.033841 ...i          301    63.806904 s..i          302    63.806919 ..hiOnce there is IO for the slot, the mark will be disappeared.	  300    75.033841 ...          301    63.806904 s..i          302    63.806919 ..hiTherefore, 300th block is idle zpage. With this feature,user can how many zram has idle pages which are waste of memory.Link: http://lkml.kernel.org/r/20181127055429.251614-5-minchan@kernel.orgSigned-off-by: Minchan Kim &lt;minchan@kernel.org&gt;Reviewed-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Reviewed-by: Joey Pabalinas &lt;joeypabalinas@gmail.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Fri, 28 Dec 2018 08:36:44 +0000</pubDate>
        <dc:creator>Minchan Kim &lt;minchan@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>5a47074f - zram: add config and doc file for writeback feature</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#5a47074f</link>
        <description>zram: add config and doc file for writeback featureThis patch adds document and kconfig for using of writeback feature.Link: http://lkml.kernel.org/r/1498459987-24562-10-git-send-email-minchan@kernel.orgSigned-off-by: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Juneho Choi &lt;juno.choi@lge.com&gt;Cc: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Wed, 06 Sep 2017 23:20:10 +0000</pubDate>
        <dc:creator>Minchan Kim &lt;minchan@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>c87d1655 - zram: remove obsolete sysfs attrs</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#c87d1655</link>
        <description>zram: remove obsolete sysfs attrsWe had a deprecated_attr_warn() warning for 2 years and now the time hascome and we finally can do the cleanup.The plan was as follows:: per-stat sysfs attributes are considered to be deprecated.: The basic strategy is:: -- the existing RW nodes will be downgraded to WO nodes (in linux 4.11): -- deprecated RO sysfs nodes will eventually be removed (in linux 4.11):: The list of deprecated attributes can be found here:: Documentation/ABI/obsolete/sysfs-block-zram:: Basically, every attribute that has its own read accessible sysfs: node (e.g. num_reads) *AND* is accessible via one of the stat files: (zram&lt;id&gt;/stat or zram&lt;id&gt;/io_stat or zram&lt;id&gt;/mm_stat) is considered: to be deprecated.The patch also removes `obsolete/sysfs-block-zram&apos;, clean ups`testing/sysfs-block-zram&apos; and tweaks zram.txt files.Link: http://lkml.kernel.org/r/20170118035838.11090-1-sergey.senozhatsky@gmail.comSigned-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Wed, 22 Feb 2017 23:46:45 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;sergey.senozhatsky.work@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>623e47fc - zram: introduce per-device debug_stat sysfs node</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#623e47fc</link>
        <description>zram: introduce per-device debug_stat sysfs nodedebug_stat sysfs is read-only and represents various debugging data thatzram developers may need.  This file is not meant to be used by anyoneelse: its content is not documented and will change any time w/o anynotice.  Therefore, the output of debug_stat file contains a versionstring.  To avoid any confusion, we will increase the version numberevery time we modify the output.At the moment this file exports only one value -- the number ofre-compressions, IOW, the number of times compression fast path hasfailed.  This stat is temporary any will be useful in case if anyper-cpu compression streams regressions will be reported.Link: http://lkml.kernel.org/r/20160513230834.GB26763@bboxLink: http://lkml.kernel.org/r/20160511134553.12655-1-sergey.senozhatsky@gmail.comSigned-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Sat, 21 May 2016 00:00:02 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>4f2109f6 - zram: export new &apos;mm_stat&apos; sysfs attrs</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#4f2109f6</link>
        <description>zram: export new &apos;mm_stat&apos; sysfs attrsPer-device `zram&lt;id&gt;/mm_stat&apos; file provides mm statistics of a particularzram device in a format similar to block layer statistics.  The fileconsists of a single line and represents the following stats (separated bywhitespace):        orig_data_size        compr_data_size        mem_used_total        mem_limit        mem_used_max        zero_pages        num_migratedSigned-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Wed, 15 Apr 2015 23:16:06 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>2f6a3bed - zram: export new &apos;io_stat&apos; sysfs attrs</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#2f6a3bed</link>
        <description>zram: export new &apos;io_stat&apos; sysfs attrsPer-device `zram&lt;id&gt;/io_stat&apos; file provides accumulated I/O statistics ofparticular zram device in a format similar to block layer statistics.  Thefile consists of a single line and represents the following stats(separated by whitespace):        failed_reads        failed_writes        invalid_io        notify_freeSigned-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Wed, 15 Apr 2015 23:16:03 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>10447b60 - zram: remove `num_migrated&apos; device attr</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#10447b60</link>
        <description>zram: remove `num_migrated&apos; device attrThis patch introduces rework to zram stats.  We have per-stat sysfs nodes,and it makes things a bit hard to use in user space: it doesn&apos;t give animmediate stats &apos;snapshot&apos;, it requires user space to use more syscalls -open, read, close for every stat file, with appropriate error checks onevery step, etc.First, zram now accounts block layer statistics, available in/sys/block/zram&lt;id&gt;/stat and /proc/diskstats files.  So some new stats areavailable (see Documentation/block/stat.txt), besides, zram&apos;s activitiesnow can be monitored by sysstat&apos;s iostat or similar tools.Example:cat /sys/block/zram0/stat248     0    1984    0   251029     0  2008232   5120   0   5116   5116Second, group currently exported on per-stat basis nodes into twocategories (files):-- zram&lt;id&gt;/io_stataccumulates device&apos;s IO stats, that are not accounted by block layer,and contains:        failed_reads        failed_writes        invalid_io        notify_freeExample:cat /sys/block/zram0/io_stat0        0        0   652572-- zram&lt;id&gt;/mm_stataccumulates zram mm stats and contains:        orig_data_size        compr_data_size        mem_used_total        mem_limit        mem_used_max        zero_pages        num_migratedExample:cat /sys/block/zram0/mm_stat434634752 270288572 279158784        0 579895296    15060        0per-stat sysfs nodes are now considered to be deprecated and we plan toremove them (and clean up some of the existing stat code) in two years (asof now, there is no warning printed to syslog about deprecated stats beingused).  User space is advised to use the above mentioned 3 files.This patch (of 7):Remove sysfs `num_migrated&apos; attribute.  We are moving away from per-statdevice attrs towards 3 stat files that will accumulate io and mm stats ina format similar to block layer statistics in /sys/block/&lt;dev&gt;/stat.  Thatwill be easier to use in user space, and reduce the number of syscallsneeded to read zram device statistics.`num_migrated&apos; will return back in zram&lt;id&gt;/mm_stat file.Signed-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Wed, 15 Apr 2015 23:15:52 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>4e3ba878 - zram: support compaction</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#4e3ba878</link>
        <description>zram: support compactionNow that zsmalloc supports compaction, zram can use it.  For the firststep, this patch exports compact knob via sysfs so user can do compactionvia &quot;echo 1 &gt; /sys/block/zram0/compact&quot;.Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Juneho Choi &lt;juno.choi@lge.com&gt;Cc: Gunho Lee &lt;gunho.lee@lge.com&gt;Cc: Luigi Semenzato &lt;semenzato@google.com&gt;Cc: Dan Streetman &lt;ddstreet@ieee.org&gt;Cc: Seth Jennings &lt;sjennings@variantweb.net&gt;Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;Cc: Jerome Marchand &lt;jmarchan@redhat.com&gt;Cc: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Cc: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;Cc: Mel Gorman &lt;mel@csn.ul.ie&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Wed, 15 Apr 2015 23:15:36 +0000</pubDate>
        <dc:creator>Minchan Kim &lt;minchan@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>015254da - zram: use notify_free to account all free notifications</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#015254da</link>
        <description>zram: use notify_free to account all free notifications`notify_free&apos; device attribute accounts the number of slot freenotifications and internally represents the number of zram_free_page()calls.  Slot free notifications are sent only when device is used as aswap device, hence `notify_free&apos; is used only for swap devices.  Sincef4659d8e620d08 (zram: support REQ_DISCARD) ZRAM handles yet another onefree notification (also via zram_free_page() call) -- REQ_DISCARDrequests, which are sent by a filesystem, whenever some data blocks arediscarded.  However, there is no way to know the number of notificationsin the latter case.Use `notify_free&apos; to account the number of pages freed byzram_bio_discard() and zram_slot_free_notify().  Depending on usagescenario `notify_free&apos; represents: a) the number of pages freed because of slot free notifications, which is   equal to the number of swap_slot_free_notify() calls, so there is no   behaviour change b) the number of pages freed because of REQ_DISCARD notificationsSigned-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;Acked-by: Jerome Marchand &lt;jmarchan@redhat.com&gt;Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;Cc: Chao Yu &lt;chao2.yu@samsung.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Thu, 09 Oct 2014 22:29:57 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>461a8eee - zram: report maximum used memory</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#461a8eee</link>
        <description>zram: report maximum used memoryNormally, zram user could get maximum memory usage zram consumed viapolling mem_used_total with sysfs in userspace.But it has a critical problem because user can miss peak memory usageduring update inverval of polling.  For avoiding that, user should poll itwith shorter interval(ie, 0.0000000001s) with mlocking to avoid page faultdelay when memory pressure is heavy.  It would be troublesome.This patch adds new knob &quot;mem_used_max&quot; so user could see the maximummemory usage easily via reading the knob and reset it via &quot;echo 0 &gt;/sys/block/zram0/mem_used_max&quot;.Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;Reviewed-by: Dan Streetman &lt;ddstreet@ieee.org&gt;Cc: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Cc: Jerome Marchand &lt;jmarchan@redhat.com&gt;Cc: &lt;juno.choi@lge.com&gt;Cc: &lt;seungho1.park@lge.com&gt;Cc: Luigi Semenzato &lt;semenzato@google.com&gt;Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;Cc: Seth Jennings &lt;sjennings@variantweb.net&gt;Reviewed-by: David Horner &lt;ds2horner@gmail.com&gt;Cc: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Thu, 09 Oct 2014 22:29:55 +0000</pubDate>
        <dc:creator>Minchan Kim &lt;minchan@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>9ada9da9 - zram: zram memory size limitation</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#9ada9da9</link>
        <description>zram: zram memory size limitationSince zram has no control feature to limit memory usage, it makes hard tomanage system memrory.This patch adds new knob &quot;mem_limit&quot; via sysfs to set up the a limit sothat zram could fail allocation once it reaches the limit.In addition, user could change the limit in runtime so that he couldmanage the memory more dynamically.Initial state is no limit so it doesn&apos;t break old behavior.[akpm@linux-foundation.org: fix typo, per Sergey]Signed-off-by: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Dan Streetman &lt;ddstreet@ieee.org&gt;Cc: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Cc: Jerome Marchand &lt;jmarchan@redhat.com&gt;Cc: &lt;juno.choi@lge.com&gt;Cc: &lt;seungho1.park@lge.com&gt;Cc: Luigi Semenzato &lt;semenzato@google.com&gt;Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;Cc: Seth Jennings &lt;sjennings@variantweb.net&gt;Cc: David Horner &lt;ds2horner@gmail.com&gt;Cc: Joonsoo Kim &lt;iamjoonsoo.kim@lge.com&gt;Cc: Minchan Kim &lt;minchan@kernel.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Thu, 09 Oct 2014 22:29:53 +0000</pubDate>
        <dc:creator>Minchan Kim &lt;minchan@kernel.org&gt;</dc:creator>
    </item>
<item>
        <title>e46b8a03 - zram: make compression algorithm selection possible</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#e46b8a03</link>
        <description>zram: make compression algorithm selection possibleAdd and document `comp_algorithm&apos; device attribute.  This attribute allowsto show supported compression and currently selected compressionalgorithms:	cat /sys/block/zram0/comp_algorithm	[lzo] lz4and change selected compression algorithm:	echo lzo &gt; /sys/block/zram0/comp_algorithmSigned-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Jerome Marchand &lt;jmarchan@redhat.com&gt;Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Mon, 07 Apr 2014 22:38:17 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>beca3ec7 - zram: add multi stream functionality</title>
        <link>http://172.16.0.5:8080/history/linux-6.15/Documentation/ABI/testing/sysfs-block-zram#beca3ec7</link>
        <description>zram: add multi stream functionalityExisting zram (zcomp) implementation has only one compression stream(buffer and algorithm private part), so in order to prevent datacorruption only one write (compress operation) can use this compressionstream, forcing all concurrent write operations to wait for stream lockto be released.  This patch changes zcomp to keep a compression streamslist of user-defined size (via sysfs device attr).  Each write operationstill exclusively holds compression stream, the difference is that wecan have N write operations (depending on size of streams list)executing in parallel.  See TEST section later in commit message forperformance data.Introduce struct zcomp_strm_multi and a set of functions to managezcomp_strm stream access.  zcomp_strm_multi has a list of idlezcomp_strm structs, spinlock to protect idle list and wait queue, makingit possible to perform parallel compressions.The following set of functions added:- zcomp_strm_multi_find()/zcomp_strm_multi_release()  find and release a compression stream, implement required locking- zcomp_strm_multi_create()/zcomp_strm_multi_destroy()  create and destroy zcomp_strm_multizcomp -&gt;strm_find() and -&gt;strm_release() callbacks are set duringinitialisation to zcomp_strm_multi_find()/zcomp_strm_multi_release()correspondingly.Each time zcomp issues a zcomp_strm_multi_find() call, the following setof operations performed:- spin lock strm_lock- if idle list is not empty, remove zcomp_strm from idle list, spin  unlock and return zcomp stream pointer to caller- if idle list is empty, current adds itself to wait queue. it will be  awaken by zcomp_strm_multi_release() caller.zcomp_strm_multi_release():- spin lock strm_lock- add zcomp stream to idle list- spin unlock, wake up sleeperMinchan Kim reported that spinlock-based locking scheme has demonstrateda severe perfomance regression for single compression stream case,comparing to mutex-based (see https://lkml.org/lkml/2014/2/18/16)base                      spinlock                    mutex==Initial write           ==Initial write             ==Initial  writerecords:  5               records:  5                 records:   5avg:      1642424.35      avg:      699610.40         avg:       1655583.71std:      39890.95(2.43%) std:      232014.19(33.16%) std:       52293.96max:      1690170.94      max:      1163473.45        max:       1697164.75min:      1568669.52      min:      573429.88         min:       1553410.23==Rewrite                 ==Rewrite                   ==Rewriterecords:  5               records:  5                 records:   5avg:      1611775.39      avg:      501406.64         avg:       1684419.11std:      17144.58(1.06%) std:      15354.41(3.06%)   std:       18367.42max:      1641800.95      max:      531356.78         max:       1706445.84min:      1593515.27      min:      488817.78         min:       1655335.73When only one compression stream available, mutex with spin on ownertends to perform much better than frequent wait_event()/wake_up().  Thisis why single stream implemented as a special case with mutex locking.Introduce and document zram device attribute max_comp_streams.  Thisattr shows and stores current zcomp&apos;s max number of zcomp streams(max_strm).  Extend zcomp&apos;s zcomp_create() with `max_strm&apos; parameter.`max_strm&apos; limits the number of zcomp_strm structs in compressionbackend&apos;s idle list (max_comp_streams).max_comp_streams used during initialisation as follows:-- passing to zcomp_create() max_strm equals to 1 will initialise zcompusing single compression stream zcomp_strm_single (mutex-based locking).-- passing to zcomp_create() max_strm greater than 1 will initialise zcompusing multi compression stream zcomp_strm_multi (spinlock-based locking).default max_comp_streams value is 1, meaning that zram with single streamwill be initialised.Later patch will introduce configuration knob to change max_comp_streamson already initialised and used zcomp.TESTiozone -t 3 -R -r 16K -s 60M -I +Z       test           base       1 strm (mutex)     3 strm (spinlock)----------------------------------------------------------------------- Initial write      589286.78       583518.39          718011.05       Rewrite      604837.97       596776.38         1515125.72  Random write      584120.11       595714.58         1388850.25        Pwrite      535731.17       541117.38          739295.27        Fwrite     1418083.88      1478612.72         1484927.06Usage example:set max_comp_streams to 4        echo 4 &gt; /sys/block/zram0/max_comp_streamsshow current max_comp_streams (default value is 1).        cat /sys/block/zram0/max_comp_streamsSigned-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;Acked-by: Minchan Kim &lt;minchan@kernel.org&gt;Cc: Jerome Marchand &lt;jmarchan@redhat.com&gt;Cc: Nitin Gupta &lt;ngupta@vflare.org&gt;Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;

            List of files:
            /linux-6.15/Documentation/ABI/testing/sysfs-block-zram</description>
        <pubDate>Mon, 07 Apr 2014 22:38:14 +0000</pubDate>
        <dc:creator>Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;</dc:creator>
    </item>
</channel>
</rss>
