[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8760bci3vl.fsf@linux.intel.com>
Date: Wed, 18 Oct 2017 13:43:10 -0700
From: Andi Kleen <ak@...ux.intel.com>
To: Srividya Desireddy <srividya.dr@...sung.com>
Cc: "sjenning\@redhat.com" <sjenning@...hat.com>,
"ddstreet\@ieee.org" <ddstreet@...e.org>,
"linux-mm\@kvack.org" <linux-mm@...ck.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
"penberg\@kernel.org" <penberg@...nel.org>,
Dinakar Reddy Pathireddy <dinakar.p@...sung.com>,
SHARAN ALLUR <sharan.allur@...sung.com>,
RAJIB BASU <rajib.basu@...sung.com>,
JUHUN KIM <juhunkim@...sung.com>,
"srividya.desireddy\@gmail.com" <srividya.desireddy@...il.com>
Subject: Re: [PATCH] zswap: Same-filled pages handling
Srividya Desireddy <srividya.dr@...sung.com> writes:
>
> On a ARM Quad Core 32-bit device with 1.5GB RAM by launching and
> relaunching different applications, out of ~64000 pages stored in
> zswap, ~11000 pages were same-value filled pages (including zero-filled
> pages) and ~9000 pages were zero-filled pages.
What are the values for the non zero cases?
> +static int zswap_is_page_same_filled(void *ptr, unsigned long *value)
> +{
> + unsigned int pos;
> + unsigned long *page;
> +
> + page = (unsigned long *)ptr;
> + for (pos = 1; pos < PAGE_SIZE / sizeof(*page); pos++) {
> + if (page[pos] != page[0])
> + return 0;
> + }
So on 32bit it checks for 32bit repeating values and on 64bit
for 64bit repeating values. Does that make sense?
Did you test the patch on a 64bit system?
Overall I would expect this extra pass to be fairly expensive. It may
be better to add some special check to the compressor, and let
it abort if it sees a string of same values, and only do the check
then.
-Andi
Powered by blists - more mailing lists