From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933265AbdK2Per (ORCPT ); Wed, 29 Nov 2017 10:34:47 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:61536 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755043AbdK2Pel (ORCPT ); Wed, 29 Nov 2017 10:34:41 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20171129153440epoutp0437360c25012cfe7660f6666a10f9e775~7mGnKzKie1557715577epoutp04Q X-AuditID: b6c32a4b-cdfff700000011c1-f1-5a1ed38ef2f5 Mime-Version: 1.0 Subject: [PATCH] zswap: Update with same-value filled page feature Reply-To: srividya.dr@samsung.com From: Srividya Desireddy To: Dan Streetman , "sjenning@redhat.com" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" CC: Dinakar Reddy Pathireddy , RAJIB BASU , Srikanth Mandalapu , SHARAN ALLUR , JUHUN KIM , Srividya Desireddy , "srividya.desireddy@gmail.com" X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: X-Drm-Type: N,general X-EPWebmail-Msg-Type: personal X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <20171129153437epcms5p64b04efa370cc42bb0f9e5677e298704e@epcms5p6> Date: Wed, 29 Nov 2017 15:34:37 +0000 X-CMS-MailID: 20171129153437epcms5p64b04efa370cc42bb0f9e5677e298704e Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-CPGSPASS: Y X-CPGSPASS: Y X-MTR: 20171129153437epcms5p64b04efa370cc42bb0f9e5677e298704e CMS-TYPE: 105P X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOKsWRmVeSWpSXmKPExsWy7bCmhm7fZbkogy3XJSxeHtK0uNC2m8Vi d8cJRovT306zWlzeNYfN4t6a/6wWs35OYrNYsmwts8Wui0/YLBb+v8hocW5mM6PFz29/WR14 PHbOusvu8XTCQSaPTZ8msXu833eVzaNvyypGj8+b5ALYorhsUlJzMstSi/TtErgy/l2fxlSw XLBi9a+FLA2MB/m6GDk4JARMJF6cNuxi5OIQEtjNKNF7bCMzSJxXQFDi7w7hLkZODmEBJ4n1 l9exgNhCAooSzd0bGCHiJhKb/i1gAilnEzCSOHw+B2SMiMABRolnVzvZQRxmgWNMEo8WnwVr kBDglZjR/pQFwpaW2L58K1icUyBQYsn5GUwQcVGJm6vfskPYchLTvq5hhom/PzYfao6IROu9 s1BxQYkHP3dDxaUk7n47wAKyWEJgG6PEpMkroYYuZ5S4d4cVwjaXePvyIFicV8BX4tbNtWDN LAKqEnOv32CDBIqLxN7FmiBhZgF5ie1v54DDhFlAU2L9Ln2YVxo2/mbHZNtKLLvSxQTRyifR +/sJE0zNjnlPmCCmq0r8X2Q5gVFlFiKgZyHZNQth1wJG5lWMkqkFxbnpqcWmBcZ5qeV6xYm5 xaV56XrJ+bmbGMHJSct7B+Omcz6HGAU4GJV4eDVWy0YJsSaWFVfmHmKU4GBWEuFV2C0XJcSb klhZlVqUH19UmpNafIhRmoNFSZz32M7SSCGB9MSS1OzU1ILUIpgsEwenVANjKvtjAf5/vhnz 9+Uuj9tr4h9iWXlTTVSg887HiKmfxLuFftmqr/88w3NWV/Hhs4+WyvVysjur/1mw6WsCR4ZM isDZ93bnYx6r/WCIXzwzpP5127Rs/2MPerUvLw+QnxFg33P336Lk9IuiD/758pY2TOQ90Zod Lnf5kMvVO1waKxY7zs+InXlUiaU4I9FQi7moOBEAsU1cc0oDAAA= X-CMS-RootMailID: 20171018104832epcms5p1b2232e2236258de3d03d1344dde9fce0 X-RootMTR: 20171018104832epcms5p1b2232e2236258de3d03d1344dde9fce0 References: <20171018104832epcms5p1b2232e2236258de3d03d1344dde9fce0@epcms5p1> <20171120154648.6c2f96804c4c1668bd8d572a@linux-foundation.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srividya Desireddy Date: Wed, 29 Nov 2017 20:23:15 +0530 Subject: [PATCH] zswap: Update with same-value filled page feature Updated zswap document with details on same-value filled pages identification feature. The usage of zswap.same_filled_pages_enabled module parameter is explained. Signed-off-by: Srividya Desireddy --- Documentation/vm/zswap.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Documentation/vm/zswap.txt b/Documentation/vm/zswap.txt index 89fff7d..cc015b5 100644 --- a/Documentation/vm/zswap.txt +++ b/Documentation/vm/zswap.txt @@ -98,5 +98,25 @@ request is made for a page in an old zpool, it is uncompressed using its original compressor. Once all pages are removed from an old zpool, the zpool and its compressor are freed. +Some of the pages in zswap are same-value filled pages (i.e. contents of the +page have same value or repetitive pattern). These pages include zero-filled +pages and they are handled differently. During store operation, a page is +checked if it is a same-value filled page before compressing it. If true, the +compressed length of the page is set to zero and the pattern or same-filled +value is stored. + +Same-value filled pages identification feature is enabled by default and can be +disabled at boot time by setting the "same_filled_pages_enabled" attribute to 0, +e.g. zswap.same_filled_pages_enabled=0. It can also be enabled and disabled at +runtime using the sysfs "same_filled_pages_enabled" attribute, e.g. + +echo 1 > /sys/module/zswap/parameters/same_filled_pages_enabled + +When zswap same-filled page identification is disabled at runtime, it will stop +checking for the same-value filled pages during store operation. However, the +existing pages which are marked as same-value filled pages will be loaded or +invalidated. + A debugfs interface is provided for various statistic about pool size, number -of pages stored, and various counters for the reasons pages are rejected. +of pages stored, same-value filled pages and various counters for the reasons +pages are rejected. -- 2.7.4