[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171018123427.GA7271@bombadil.infradead.org>
Date: Wed, 18 Oct 2017 05:34:28 -0700
From: Matthew Wilcox <willy@...radead.org>
To: Srividya Desireddy <srividya.dr@...sung.com>
Cc: "sjenning@...hat.com" <sjenning@...hat.com>,
"ddstreet@...e.org" <ddstreet@...e.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"penberg@...nel.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@...il.com" <srividya.desireddy@...il.com>
Subject: Re: [PATCH] zswap: Same-filled pages handling
On Wed, Oct 18, 2017 at 10:48:32AM +0000, Srividya Desireddy wrote:
> +static void zswap_fill_page(void *ptr, unsigned long value)
> +{
> + unsigned int pos;
> + unsigned long *page;
> +
> + page = (unsigned long *)ptr;
> + if (value == 0)
> + memset(page, 0, PAGE_SIZE);
> + else {
> + for (pos = 0; pos < PAGE_SIZE / sizeof(*page); pos++)
> + page[pos] = value;
> + }
> +}
I think you meant:
static void zswap_fill_page(void *ptr, unsigned long value)
{
memset_l(ptr, value, PAGE_SIZE / sizeof(unsigned long));
}
(and you should see significantly better numbers at least on x86;
I don't know if anyone's done an arm64 version of memset_l yet).
Powered by blists - more mailing lists