From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752573AbdLFPVL (ORCPT ); Wed, 6 Dec 2017 10:21:11 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:43167 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752531AbdLFPVG (ORCPT ); Wed, 6 Dec 2017 10:21:06 -0500 X-Google-Smtp-Source: AGs4zMaJJrPhRGnhiToequ8ayqBL3LAila79B+EHTFNy26D+evIQmrqhylNibC+VCI3R8cX7xzKBD+zJb7JmeriqZg0= MIME-Version: 1.0 In-Reply-To: <20171206114852epcms5p6973b02a9f455d5d3c765eafda0fe2631@epcms5p6> References: <20171018104832epcms5p1b2232e2236258de3d03d1344dde9fce0@epcms5p1> <20171120154648.6c2f96804c4c1668bd8d572a@linux-foundation.org> <20171129153437epcms5p64b04efa370cc42bb0f9e5677e298704e@epcms5p6> <20171206114852epcms5p6973b02a9f455d5d3c765eafda0fe2631@epcms5p6> From: Dan Streetman Date: Wed, 6 Dec 2017 10:20:25 -0500 X-Google-Sender-Auth: ArvLSTkF0SSZsnQCfjY17F8Q6DA Message-ID: Subject: Re: [PATCH v2] zswap: Update with same-value filled page feature To: Srividya Desireddy Cc: "sjenning@redhat.com" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Dinakar Reddy Pathireddy , RAJIB BASU , Srikanth Mandalapu , SHARAN ALLUR , JUHUN KIM , "srividya.desireddy@gmail.com" , Andrew Morton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 6, 2017 at 6:48 AM, Srividya Desireddy wrote: > From: Srividya Desireddy > Date: Wed, 6 Dec 2017 16:29:50 +0530 > Subject: [PATCH v2] zswap: Update with same-value filled page feature > > Changes since v1: > Updated to clarify about zswap.same_filled_pages_enabled parameter. > > 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 Acked-by: Dan Streetman > --- > 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..0b3a114 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 remain stored > +unchanged in zswap until they are either 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 mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f200.google.com (mail-io0-f200.google.com [209.85.223.200]) by kanga.kvack.org (Postfix) with ESMTP id C467F6B0038 for ; Wed, 6 Dec 2017 10:21:07 -0500 (EST) Received: by mail-io0-f200.google.com with SMTP id w191so2323628iof.11 for ; Wed, 06 Dec 2017 07:21:07 -0800 (PST) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id a19sor1473864ioj.28.2017.12.06.07.21.06 for (Google Transport Security); Wed, 06 Dec 2017 07:21:06 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20171206114852epcms5p6973b02a9f455d5d3c765eafda0fe2631@epcms5p6> References: <20171018104832epcms5p1b2232e2236258de3d03d1344dde9fce0@epcms5p1> <20171120154648.6c2f96804c4c1668bd8d572a@linux-foundation.org> <20171129153437epcms5p64b04efa370cc42bb0f9e5677e298704e@epcms5p6> <20171206114852epcms5p6973b02a9f455d5d3c765eafda0fe2631@epcms5p6> From: Dan Streetman Date: Wed, 6 Dec 2017 10:20:25 -0500 Message-ID: Subject: Re: [PATCH v2] zswap: Update with same-value filled page feature Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Srividya Desireddy Cc: "sjenning@redhat.com" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Dinakar Reddy Pathireddy , RAJIB BASU , Srikanth Mandalapu , SHARAN ALLUR , JUHUN KIM , "srividya.desireddy@gmail.com" , Andrew Morton On Wed, Dec 6, 2017 at 6:48 AM, Srividya Desireddy wrote: > From: Srividya Desireddy > Date: Wed, 6 Dec 2017 16:29:50 +0530 > Subject: [PATCH v2] zswap: Update with same-value filled page feature > > Changes since v1: > Updated to clarify about zswap.same_filled_pages_enabled parameter. > > 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 Acked-by: Dan Streetman > --- > 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..0b3a114 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 remain stored > +unchanged in zswap until they are either 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 > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org