Re: [PATCH 1/2] mm/zsmalloc: fix class per-fullness zspage counts

From: Chengming Zhou
Date: Sun Jun 30 2024 - 22:49:35 EST


On 2024/7/1 10:20, Chengming Zhou wrote:
On 2024/7/1 09:37, Sergey Senozhatsky wrote:
On (24/06/28 11:19), Chengming Zhou wrote:
Andrew, could you please help to change the subject as Sergey asked?
Sorry, I should have noted these details in the changelog when I wrote
this subject.

Chengming, can I ask you to resend these patches with a proper commit
message?

Of course, will update and send later.

I just pulled mm/mm-unstable and ready to update, but find Andrew has already helped to change the subject and commit message as below, which
is great enough! Thanks!

commit 84d0abc5905bbdf29dc7ff8083d21145d78a3ffe
Author: Chengming Zhou <chengming.zhou@xxxxxxxxx>
Date: Thu Jun 27 15:59:58 2024 +0800

mm/zsmalloc: clarify class per-fullness zspage counts

We always use insert_zspage() and remove_zspage() to update zspage's
fullness location, which will account correctly.

But this special async free path use "splice" instead of remove_zspage(),
so the per-fullness zspage count for ZS_INUSE_RATIO_0 won't decrease.

Clean things up by decreasing when iterate over the zspage free list.

This doesn't actually fix anything. ZS_INUSE_RATIO_0 is just a
"placeholder" which is never used anywhere.

Link: https://lkml.kernel.org/r/20240627075959.611783-1-chengming.zhou@xxxxxxxxx
Signed-off-by: Chengming Zhou <chengming.zhou@xxxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Cc: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>