Re: [PATCH RESEND 3/3] mm/zsmalloc: remove get_zspage_mapping()

Sergey Senozhatsky
2024-02-23T05:48:51Z

On (24/02/20 11:44), Chengming Zhou wrote:
> From: Chengming Zhou <zhouchengming@bytedance.com>
>
> Actually we seldom use the class_idx returned from get_zspage_mapping(),
> only the zspage->fullness is useful, just use zspage->fullness to remove
> this helper.
>
> Note zspage->fullness is not stable outside pool->lock, remove redundant
> "VM_BUG_ON(fullness != ZS_INUSE_RATIO_0)" in async_free_zspage() since
> we already have the same VM_BUG_ON() in __free_zspage(), which is safe to
> access zspage->fullness with pool->lock held.
>
> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>

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