[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKEwX=Mq=EtxhnKhNQ7ZdK18wU9hPEarLR1NhsgB3hm6G-GRkw@mail.gmail.com>
Date: Wed, 20 Aug 2025 11:17:33 -0700
From: Nhat Pham <nphamcs@...il.com>
To: akpm@...ux-foundation.org
Cc: hannes@...xchg.org, yosry.ahmed@...ux.dev, chengming.zhou@...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 Wed, Aug 20, 2025 at 11:15 AM 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
> 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@bytedance.com/
> [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>
The syntax changes very slightly, but this is functionally the same
patch as Chengming's. So I'm keeping all of his credit - please let me
know if I miss any proper accreditations. :)
Powered by blists - more mailing lists