[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fa282bea-4639-4d04-9d99-b9e2838a6b7a@linux.dev>
Date: Fri, 28 Jun 2024 11:22:48 +0800
From: Chengming Zhou <chengming.zhou@...ux.dev>
To: Sergey Senozhatsky <senozhatsky@...omium.org>,
Andrew Morton <akpm@...ux-foundation.org>, Minchan Kim <minchan@...nel.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] zsmalloc: rename class stat mutators
On 2024/6/28 09: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).
>
> Signed-off-by: Sergey Senozhatsky <senozhatsky@...omium.org>
Looks good to me.
Reviewed-by: Chengming Zhou <chengming.zhou@...ux.dev>
Powered by blists - more mailing lists