]> www.infradead.org Git - users/jedix/linux-maple.git/commit
zsmalloc: rename class stat mutators
authorSergey Senozhatsky <senozhatsky@chromium.org>
Mon, 1 Jul 2024 03:11:37 +0000 (12:11 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Jul 2024 22:52:13 +0000 (15:52 -0700)
commit791abe1e420c3dad6ddbd0a6c40467e9e24059b7
tree58912fb44ba580e2c6d0dd086c4d1713ad1852ae
parent9b89e018990de47c72ef8b2ca29204f88fda8f05
zsmalloc: rename class stat mutators

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).

Link: https://lkml.kernel.org/r/20240701031140.3756345-1-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/zsmalloc.c