Re: [PATCH] mm: extend zero pages to same element pages for zram

From: Sergey Senozhatsky
Date: Mon Jan 23 2017 - 02:13:41 EST


On (01/23/17 15:27), Joonsoo Kim wrote:
> Hello,
>
> Think about following case in 64 bits kernel.
>
> If value pattern in the page is like as following, we cannot detect
> the same page with 'unsigned int' element.
>
> AAAAAAAABBBBBBBBAAAAAAAABBBBBBBB...
>
> 4 bytes is 0xAAAAAAAA and next 4 bytes is 0xBBBBBBBB and so on.

yep, that's exactly the case that I though would be broken
with a 4-bytes pattern matching. so my conlusion was that
for 4 byte pattern we would have working detection anyway,
for 8 bytes patterns we might have some extra matching.
not sure if it matters that much though.

-ss