Re: [PATCH] mm/zswap: export zswap API to modules

From: David Hildenbrand
Date: Mon Jun 23 2025 - 15:33:28 EST


On 20.06.25 21:47, Matthew Wilcox wrote:
On Fri, Jun 20, 2025 at 09:35:52PM +0200, Vitaly Wool wrote:
There is no reason to not let modules use zswap capabilies to
densely store unused pages in RAM. This will allow to remove some
homebrew solutions for e.g. GPU drivers in favor of plainly using
zswap pool.

I really think these should be _GPL exports. And I'm not sure why the
GPU drivers are using "homebrew solutions" instead of using the shmem
APIs which work whether zswap is configured in or not.

In particular, because zswap is tightly glued to actual swap code (e.g., swap_writeout()), and we should review first if any such GPU user should really be talking to zswap directly.

--
Cheers,

David / dhildenb