Re: [PATCH] mm: Add Kcompressd for accelerated memory compression

From: Nhat Pham
Date: Thu May 01 2025 - 11:13:09 EST


On Thu, May 1, 2025 at 7:02 AM Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
>
>
> The way you implemented this adds time-and-space overhead even on
> systems that don't have any sort of swap compression enabled.
>
> That seems unnecessary. There is an existing method for asynchronous
> writeback, and pageout() is naturally fully set up to handle this.
>
> IMO the better way to do this is to make zswap_store() (and
> zram_bio_write()?) asynchronous. Make those functions queue the work
> and wake the compression daemon, and then have the daemon call
> folio_end_writeback() / bio_endio() when it's done with it.

+1.