Received: by 10.223.164.202 with SMTP id h10csp4518795wrb; Wed, 29 Nov 2017 07:36:03 -0800 (PST) X-Google-Smtp-Source: AGs4zMaHV0jXMFD1wtPhsiRuU3Tr3ed443KiDQwGFRb/Ln8ckGhT9JNBYZEvqbEPM+11xB5v36pA X-Received: by 10.98.25.211 with SMTP id 202mr3382821pfz.46.1511969763542; Wed, 29 Nov 2017 07:36:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511969763; cv=none; d=google.com; s=arc-20160816; b=z/SkLvDVsXxsl3sWhIho/xq440SDIDRWXuG+avivznxM14m8SBICDI4KQbrlKJi6J5 5a/62aF8R6cV0NDKtD4u92kGpuq7IawjCeK14QnLgL6zttnBoPKUbqrpe9QH8CNRny+B z6hqSeoybSpKLjJmSGj6+Jayh9gxsMhB39ZJZGcqBZ1wsny6PmJa1ZPvJMc3wX82ok8Q NKPXaz4erqa9iOTe8NMdOxUBriLLDHXdiEbuLSJKU6t+UXHiUNp9mwuRJahlu7gultU0 RdZ04e8uGSNacqNivj1rcRK6JIM2OEPI+lXq+5gXfNLoOIyOiUluvKuvYaRsO8Ktn/7n S0cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:date:message-id:in-reply-to:cc:to:from :reply-to:subject:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=N7unjKIcGx7eHLgPu0EFzeAU7v0ux9Ot3OHoaszsxnM=; b=tI4Tj1JQIgsBtNC2Y5T9+94dmdbU3NhaVZE5k5xYN+LLFaC5wy9C8/U4xGZCr4EUAc X+ObuQxK8vsH9p9P0drBxzu4aWZS0DRdGu4EXqE1jbt+9xAnYixDPtg5b8qLTL6Cvt19 uwNUgclr9es+wJ8AyRGVfzEfnIjIZP16lkb0JTPqN4v6LYXmAKqajPlPQPT27Bew5smn K3GDFn1K39Dn/eOwRXpj2zSH3vwuG/wfyhGyCKB70GQvUjG2+NhVlvN5BDmBeITuPBBR wZrwvGs4lIsrifuSgjzCmSHRUCuNyjsrXVq7u6L9bhre6A+UPPZDmCtvdXoyUTdpXZEB qPTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=eSPqND5D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si1440483pga.52.2017.11.29.07.35.53; Wed, 29 Nov 2017 07:36:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=eSPqND5D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933263AbdK2Per (ORCPT + 69 others); 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 Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20171129153440epoutp0437360c25012cfe7660f6666a10f9e775~7mGnKzKie1557715577epoutp04Q for ; Wed, 29 Nov 2017 15:34:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20171129153440epoutp0437360c25012cfe7660f6666a10f9e775~7mGnKzKie1557715577epoutp04Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1511969680; bh=N7unjKIcGx7eHLgPu0EFzeAU7v0ux9Ot3OHoaszsxnM=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=eSPqND5DQrpCAGaofcIO6y1xxB10saVuqnWvPQBYZowftbptJWyfatbT5YSyKwMge 3I40afEvig6uaEYDPqhr0P6fqzhFjM23xSENLq+HsIvr6e4hG+LgoawLpFqS1R1MG4 x6qygbdf5JHSkZlQd3OM+4rwLhE5NLRfmi8wRn/Q= Received: from epsmges5p3new.samsung.com (unknown [182.195.42.75]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20171129153438epcas5p3ede6d9bfa4b53679f713b01dd50d6675~7mGlvYdEi2497124971epcas5p3h; Wed, 29 Nov 2017 15:34:38 +0000 (GMT) X-AuditID: b6c32a4b-cdfff700000011c1-f1-5a1ed38ef2f5 Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 3B.A1.04545.E83DE1A5; Thu, 30 Nov 2017 00:34:38 +0900 (KST) 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 Precedence: bulk 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 From 1586117259549249109@xxx Thu Dec 07 09:34:53 +0000 2017 X-GM-THRID: 1586117259549249109 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread