Re: [PATCH v6 09/13] zram: split zcomp into separate R/W streams
From: Sergey Senozhatsky
Date: Wed Oct 21 2026 - 22:07:04 EST
On (26/10/22 08:08), Hillf Danton wrote:
[..]
> >>> Given lock like mutex, priority inversion happens from Monday to Friday,
> >>> but I wonder if you are inventing some wheels in 2026 if proxy excution
> >>> works for you.
> >>
> >> Reader-Writer split is a foundation for further improvements (like
> >> singleton recompression stream and so on).
> >>
> > But that split is not needed at all if PE works, yes?
> >
>
> When the number of locks and tasks grows, I have increasing difficulty even
> describing the lock chain that you in combination with Brian are unable to
> handle. That is why in general PE is prefered over whatever wheels you can create.
Hillf, if we reinvent the wheel then I'm very happy with this reinvention.
But we don't.
There is not a single reason for compression and decompression to be in
the same context - they don't share a single byte. And there is no
reason whatsoever to serialize them against each other. Compression and
decompression should have been separate contexts from the beginning.
While serializing decompression with a PE/PI-enabled mutex is cool, not
having decompression serialization at all is way cooler. In addition,
decoupling compression and decompression leads to a much saner recompression
stream design, which saves considerable amount of per-CPU memory.
That's what this patch does for us.
The commit message probably can be better, but other than that I'm
happy with this series.