Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1466039 > unrolled thread

[PATCH 3/4] zswap: Zero-filled pages handling

Started bySrividya Desireddy <srividya.dr@samsung.com>
First post2016-08-19 08:10 +0200
Last post2016-08-19 08:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

   [PATCH 3/4] zswap: Zero-filled pages handling Srividya Desireddy <srividya.dr@samsung.com> - 2016-08-19 08:10 +0200

#1466039 — [PATCH 3/4] zswap: Zero-filled pages handling

FromSrividya Desireddy <srividya.dr@samsung.com>
Date2016-08-19 08:10 +0200
Subject [PATCH 3/4] zswap: Zero-filled pages handling
Message-ID<s7Laa-1TE-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web