Re: [PATCH] zsmalloc: rename class stat mutators

From: Chengming Zhou
Date: Sun Jun 30 2024 - 23:19:59 EST


On 2024/7/1 11:11, Sergey Senozhatsky wrote:
A cosmetic change.

o Rename class_stat_inc() and class_stat_dec() to class_stat_add()
and class_stat_sub() correspondingly. inc/dec are usually associated
with +1/-1 modifications, while zsmlloc can modify stats by up
to ->objs_per_zspage. Use add/sub (follow atomics naming).

o Rename zs_stat_get() to class_stat_read()
get() is usually associated with ref-counting and is paired with put().
zs_stat_get() simply reads class stat so rename to reflect it.
(This also follows atomics naming).

Signed-off-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>

Reviewed-by: Chengming Zhou <chengming.zhou@xxxxxxxxx>