Re: [PATCH RESEND 1/3] mm/zsmalloc: fix migrate_write_lock() when !CONFIG_COMPACTION

Sergey Senozhatsky
2024-02-23T05:49:26Z

On (24/02/20 11:36), Chengming Zhou wrote:
> From: Chengming Zhou <zhouchengming@bytedance.com>
>
> migrate_write_lock() is a empty function when !CONFIG_COMPACTION, in
> which case zs_compact() can be triggered from shrinker reclaim context.
> (Maybe it's better to rename it to zs_shrink()?)
>
> And zspage map object users rely on this migrate_read_lock() so object
> won't be migrated elsewhere.
>
> Fix it by always implementing the migrate_write_lock() related functions.
>
> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>

Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>