All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chengming Zhou <chengming.zhou@linux.dev>
To: Nhat Pham <nphamcs@gmail.com>, SeongJae Park <sj@kernel.org>
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org,
	yosry.ahmed@linux.dev, herbert@gondor.apana.org.au,
	linux-mm@kvack.org, kernel-team@meta.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/zswap: reduce the size of the compression buffer to a single page
Date: Thu, 21 Aug 2025 09:36:42 +0800	[thread overview]
Message-ID: <65263090-79a9-4d18-a016-c8f08dcfff8d@linux.dev> (raw)
In-Reply-To: <CAKEwX=NLvQyZTqv15kACZP2wErO9hyv9W+0j-BWrgOh5ZX1LJA@mail.gmail.com>

On 2025/8/21 06:56, Nhat Pham wrote:
> On Wed, Aug 20, 2025 at 3:47 PM SeongJae Park <sj@kernel.org> wrote:
>>
>> On Wed, 20 Aug 2025 11:15:47 -0700 Nhat Pham <nphamcs@gmail.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@linux.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@linux.dev>
>>> Signed-off-by: Chengming Zhou <chengming.zhou@linux.dev>
>>> Signed-off-by: Nhat Pham <nphamcs@gmail.com>
>>
>> Acked-by: SeongJae Park <sj@kernel.org>


      reply	other threads:[~2025-08-21  1:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 18:15 [PATCH] mm/zswap: reduce the size of the compression buffer to a single page Nhat Pham
2025-08-20 18:17 ` Nhat Pham
2025-08-20 22:46 ` SeongJae Park
2025-08-20 22:56   ` Nhat Pham
2025-08-21  1:36     ` Chengming Zhou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65263090-79a9-4d18-a016-c8f08dcfff8d@linux.dev \
    --to=chengming.zhou@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=sj@kernel.org \
    --cc=yosry.ahmed@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.