Re: [PATCH] mm/zswap: reduce the size of the compression buffer to a single page
From: SeongJae Park
Date: Wed Aug 20 2025 - 18:47:23 EST
On Wed, 20 Aug 2025 11:15:47 -0700 Nhat Pham <nphamcs@xxxxxxxxx> 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
> 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.
>
> 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@xxxxxxxxxxxxx/
This is not mentioned anywhere. Probably you added this as a reference for the
past work from Chengming?
> [2]: https://lore.kernel.org/lkml/0000000000000b05cd060d6b5511@xxxxxxxxxx/
> [3]: https://lore.kernel.org/linux-mm/aKUmyl5gUFCdXGn-@xxxxxxxxxxxxxxxxxxx/
>
> Co-developed-by: Chengming Zhou <chengming.zhou@xxxxxxxxx>
> Signed-off-by: Chengming Zhou <chengming.zhou@xxxxxxxxx>
> Signed-off-by: Nhat Pham <nphamcs@xxxxxxxxx>
Acked-by: SeongJae Park <sj@xxxxxxxxxx>
[...]
Thanks,
SJ