lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <65263090-79a9-4d18-a016-c8f08dcfff8d@linux.dev>
Date: Thu, 21 Aug 2025 09:36:42 +0800
From: Chengming Zhou <chengming.zhou@...ux.dev>
To: Nhat Pham <nphamcs@...il.com>, SeongJae Park <sj@...nel.org>
Cc: akpm@...ux-foundation.org, hannes@...xchg.org, yosry.ahmed@...ux.dev,
 herbert@...dor.apana.org.au, linux-mm@...ck.org, kernel-team@...a.com,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/zswap: reduce the size of the compression buffer to a
 single page

On 2025/8/21 06:56, Nhat Pham wrote:
> On Wed, Aug 20, 2025 at 3:47 PM SeongJae Park <sj@...nel.org> wrote:
>>
>> On Wed, 20 Aug 2025 11:15:47 -0700 Nhat Pham <nphamcs@...il.com> wrote:
>>
>>> Reduce the compression buffer size from 2 * PAGE_SIZE to only one page,
>>> as the compression output (in the success case) should not exceed the
>>> length of the input.
>>>
>>> In the past, Chengming tried to reduce the compression buffer size, but
> 
> Yeah, this should include the reference below. My bad. So it should be:
> 
> In the past, Chengming tried to reduce the compression buffer size
> (see [1]), but
> 
> Andrew, would it be OK if you fix it for me when you put this patch in
> your tree :) Or I can also send a new version if that's better. Thank
> you!
> 
>>> ran into issues with the LZO algorithm (see [2]). Herbert Xu reported
>>> that the issue has been fixed (see [3]). Now we should have the
>>> guarantee that compressors' output should not exceed one page in the
>>> success case, and the algorithm will just report failure otherwise.

Great!

Reviewed-by: Chengming Zhou <chengming.zhou@...ux.dev>

Thank you!

>>>
>>> With this patch, we save one page per cpu (per compression algorithm).
>>>
>>> [1]: https://lore.kernel.org/linux-mm/20231213-zswap-dstmem-v4-1-f228b059dd89@bytedance.com/
>>
>> This is not mentioned anywhere.  Probably you added this as a reference for the
>> past work from Chengming?
> 
> Thanks for taking a look, SJ!
> 
>>
>>> [2]: https://lore.kernel.org/lkml/0000000000000b05cd060d6b5511@google.com/
>>> [3]: https://lore.kernel.org/linux-mm/aKUmyl5gUFCdXGn-@gondor.apana.org.au/
>>>
>>> Co-developed-by: Chengming Zhou <chengming.zhou@...ux.dev>
>>> Signed-off-by: Chengming Zhou <chengming.zhou@...ux.dev>
>>> Signed-off-by: Nhat Pham <nphamcs@...il.com>
>>
>> Acked-by: SeongJae Park <sj@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ