linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
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 05:51:48 +0000	[thread overview]
Message-ID: <1267599031.7838.1471585908108.JavaMail.weblogic@epwas3p2> (raw)
In-Reply-To: CGME20160817101819epcms5p25ad7d8a53c761ffff62993ca4d4bf129@epcms5p1

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]

On 17 August 2016 at 17:55, Pekka Enberg <penberg@kernel.org> wrote:
> On Wed, Aug 17, 2016 at 1:18 PM, Srividya Desireddy
> <srividya.dr@samsung.com> wrote:
>> @@ -1314,6 +1347,13 @@ static int zswap_frontswap_load(unsigned type, pgoff_t offset,
>>         }
>>         spin_unlock(&tree->lock);
>>
>> +       if (entry->zeroflag) {
>> +               dst = kmap_atomic(page);
>> +               memset(dst, 0, PAGE_SIZE);
>> +               kunmap_atomic(dst);
>> +               goto freeentry;
>> +       }
>
> Don't we need the same thing in zswap_writeback_entry() for the
> ZSWAP_SWAPCACHE_NEW case?

Zero-filled pages are not compressed and stored in the zpool memory.
Zpool handle will not be created for zero-filled pages, hence they
can not be picked for eviction/writeback to the swap device.

- Srividya
>
>> +
>>         /* decompress */
>>         dlen = PAGE_SIZE;
>>         src = (u8 *)zpool_map_handle(entry->pool->zpool, entry->zhandle->handle,
>> @@ -1327,6 +1367,7 @@ static int zswap_frontswap_load(unsigned type, pgoff_t offset,
>>         zpool_unmap_handle(entry->pool->zpool, entry->zhandle->handle);
>>         BUG_ON(ret);
>
> - Pekka

       reply	other threads:[~2016-08-19  5:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20160817101819epcms5p25ad7d8a53c761ffff62993ca4d4bf129@epcms5p1>
2016-08-19  5:51 ` Srividya Desireddy [this message]
     [not found] <CGME20160817101819epcms5p25ad7d8a53c761ffff62993ca4d4bf129@epcms5p2>
2016-08-17 10:18 ` [PATCH 3/4] zswap: Zero-filled pages handling 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

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=1267599031.7838.1471585908108.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;
as well as URLs for NNTP newsgroup(s).