lkml.org 
[lkml]   [2017]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] zswap: Zero-filled pages handling
On (07/02/17 20:28), Seth Jennings wrote:
> On Sun, Jul 2, 2017 at 9:19 AM, Srividya Desireddy
> > Zswap is a cache which compresses the pages that are being swapped out
> > and stores them into a dynamically allocated RAM-based memory pool.
> > Experiments have shown that around 10-20% of pages stored in zswap
> > are zero-filled pages (i.e. contents of the page are all zeros), but
> > these pages are handled as normal pages by compressing and allocating
> > memory in the pool.
>
> I am somewhat surprised that this many anon pages are zero filled.
>
> If this is true, then maybe we should consider solving this at the
> swap level in general, as we can de-dup zero pages in all swap
> devices, not just zswap.
>
> That being said, this is a fair small change and I don't see anything
> objectionable. However, I do think the better solution would be to do
> this at a higher level.

zero-filled pages are just 1 case. in general, it's better
to handle pages that are memset-ed with the same value (e.g.
memset(page, 0x01, page_size)). which includes, but not
limited to, 0x00. zram does it.

-ss

\
 
 \ /
  Last update: 2017-07-06 07:20    [W:0.053 / U:51.592 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site