Re: [PATCH] zsmalloc: rename class stat mutators
From: Sergey Senozhatsky
Date: Thu Jun 27 2024 - 22:22:31 EST
On (24/06/28 10:42), 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).
I think I will resend this after Chengming patches land.