Re: [PATCH] mm: zswap: invaldiate entry after writeback
From: Johannes Weiner
Date: Wed Jun 14 2023 - 10:36:02 EST
On Wed, Jun 14, 2023 at 04:31:22PM +0200, Domenico Cerasuolo wrote:
> When an entry started writeback, it used to be invalidated with ref
> count logic alone, meaning that it would stay on the tree until all
> references were put. The problem with this behavior is that as soon as
> the writeback started, the ownership of the data held by the entry is
> passed to the swapcache and should not be left in zswap too.
> Currently there are no known issues because of this, but this change
> explicitly invalidates an entry that started writeback to reduce
> opportunities for future bugs.
>
> This patch is a follow up on the series titled "mm: zswap: move
> writeback LRU from zpool to zswap" with message id
> <20230612093815.133504-1-cerasuolodomenico@xxxxxxxxx> in mm-unstable +
> commit f090b7949768("mm: zswap: support exclusive loads") that's in
> mm-unstable as well.
>
> Suggested-by: Johannes Weiner <hannes@xxxxxxxxxxx>
> Signed-off-by: Domenico Cerasuolo <cerasuolodomenico@xxxxxxxxx>
Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx>
Thanks Domenico!