[<prev] [next>] [day] [month] [year] [list]
Message-id: <1267599031.7838.1471585908108.JavaMail.weblogic@epwas3p2>
Date: Fri, 19 Aug 2016 05:51:48 +0000
From: Srividya Desireddy <srividya.dr@...sung.com>
To: penberg@...nel.org
Cc: Srividya Desireddy <srividya.dr@...sung.com>,
sjenning@...hat.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
Dinakar Reddy Pathireddy
<dinakar.p@...sung.com>,
샤란 <sharan.allur@...sung.com>,
SUNEEL KUMAR SURIMANI <suneel@...sung.com>,
김주훈 <juhunkim@...sung.com>
Subject: [PATCH 3/4] zswap: Zero-filled pages handling
On 17 August 2016 at 17:55, Pekka Enberg <penberg@...nel.org> wrote:
> On Wed, Aug 17, 2016 at 1:18 PM, Srividya Desireddy
> <srividya.dr@...sung.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
Powered by blists - more mailing lists