From: "Srividya Desireddy" <srividya.dr@samsung.com>
To: penberg@kernel.org
Cc: "Srividya Desireddy" <srividya.dr@samsung.com>,
sjenning@redhat.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
"Dinakar Reddy Pathireddy" <dinakar.p@samsung.com>,
샤란 <sharan.allur@samsung.com>,
"SUNEEL KUMAR SURIMANI" <suneel@samsung.com>,
김주훈 <juhunkim@samsung.com>
Subject: [PATCH 3/4] zswap: Zero-filled pages handling
Date: Fri, 19 Aug 2016 13:30:44 +0000 [thread overview]
Message-ID: <431871851.13330.1471613444880.JavaMail.weblogic@epwas3p2> (raw)
In-Reply-To: <CGME20160817101819epcms5p25ad7d8a53c761ffff62993ca4d4bf129@epcms5p2>
[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]
On 17 August 2016 at 18:02, Pekka Enberg <penberg@kernel.org> wrote:
> On Wed, Aug 17, 2016 at 1:18 PM, Srividya Desireddy
> <srividya.dr@samsung.com> wrote:
>>> This patch adds a check in zswap_frontswap_store() to identify zero-filled
>>> page before compression of the page. If the page is a zero-filled page, set
>>> zswap_entry.zeroflag and skip the compression of the page and alloction
>>> of memory in zpool. In zswap_frontswap_load(), check if the zeroflag is
>>> set for the page in zswap_entry. If the flag is set, memset the page with
>>> zero. This saves the decompression time during load.
>>>
>>> The overall overhead caused due to zero-filled page check is very minimal
>>> when compared to the time saved by avoiding compression and allocation in
>>> case of zero-filled pages. The load time of a zero-filled page is reduced
>>> by 80% when compared to baseline.
>
> On Wed, Aug 17, 2016 at 3:25 PM, Pekka Enberg <penberg@kernel.org> wrote:
>> AFAICT, that's an overall improvement only if there are a lot of
>> zero-filled pages because it's just overhead for pages that we *need*
>> to compress, no? So I suppose the question is, are there a lot of
>> zero-filled pages that we need to swap and why is that the case?
>
> I suppose reading your cover letter would have been helpful before
> sending out my email:
>
> "Experiments have shown that around 10-15% of pages stored in zswap are
> duplicates which results in 10-12% more RAM required to store these
> duplicate compressed pages."
>
> But I still don't understand why we have zero-filled pages that we are
> swapping out.
>
> - Pekka
Zero-filled pages exists in memory because applications may be
initializing the allocated pages with zeros and not using them; or
the actual content written to the memory pages during execution
itself is zeros.
The existing page reclamation path in kernel does not check for
zero-filled pages in the anonymous LRU lists before swapping out.
- Srividya
next prev parent reply other threads:[~2016-08-19 13:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20160817101819epcms5p25ad7d8a53c761ffff62993ca4d4bf129@epcms5p2>
2016-08-17 10:18 ` Srividya Desireddy
2016-08-17 12:25 ` Pekka Enberg
2016-08-17 12:32 ` Pekka Enberg
2017-02-17 20:06 ` Dan Streetman
2016-08-19 13:30 ` Srividya Desireddy [this message]
[not found] <CGME20160817101819epcms5p25ad7d8a53c761ffff62993ca4d4bf129@epcms5p1>
2016-08-19 5:51 ` Srividya Desireddy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=431871851.13330.1471613444880.JavaMail.weblogic@epwas3p2 \
--to=srividya.dr@samsung.com \
--cc=dinakar.p@samsung.com \
--cc=juhunkim@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=sharan.allur@samsung.com \
--cc=sjenning@redhat.com \
--cc=suneel@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox