Re: [PATCH] zram: Avoid duplicate slots in batched writeback

From: Sergey Senozhatsky

Date: Fri Nov 13 2026 - 21:42:00 EST


On (26/11/13 10:50), David Hildenbrand (Arm) wrote:
> > I grabbed it.
> >
> > I did recently attempt to pull zram out of the mm project, by moving it
> > from mm.git's mm-unstable branch and into mm.git's mm-nonmm-unstable
> > branch. Because "why does the mm project contain a block device
> > driver".
> >
> > I undid that change after about a week - it didn't work out because
> > zram is joined at the hip with mm/zsmalloc.c. zsmalloc is also used by
> > mm/zswap.c.
>
> Are there cleaner ways of isolating both things?
>
> Like, many drivers use kmalloc() etc, and they are not part of core-mm :)

This dev cycle is a little unusual, because on the zsmalloc side we
removed that "kmalloc()" [1] (along with other exported symbols that
both zram and zswap use), introduced new "kmalloc" API and this
happened atop of a very large and intrusive zram rework [2].

We don't change zsmalloc exported API too often, but it happens,
sometimes.

[1] https://lore.kernel.org/lkml/20261111064707.2568433-1-senozhatsky@xxxxxxxxxxxx/
[2] https://lore.kernel.org/linux-kernel/20261025021839.1542805-1-senozhatsky@xxxxxxxxxxxx