mm/slub: fix bulk alloc and free stats
authorVlastimil Babka <vbabka@suse.cz>
Mon, 7 Aug 2023 18:50:44 +0000 (20:50 +0200)
committerVlastimil Babka <vbabka@suse.cz>
Thu, 7 Dec 2023 11:41:48 +0000 (12:41 +0100)
commit6f3dd2c31d7d703a814c59f60daf95c57fa6a4c2
tree38f953c4cdee4ab3059709ec3ca72754d8838d54
parentecf9a253ce120082ce0a8aff806c4de4865cfcc5
mm/slub: fix bulk alloc and free stats

The SLUB sysfs stats enabled CONFIG_SLUB_STATS have two deficiencies
identified wrt bulk alloc/free operations:

- Bulk allocations from cpu freelist are not counted. Add the
  ALLOC_FASTPATH counter there.

- Bulk fastpath freeing will count a list of multiple objects with a
  single FREE_FASTPATH inc. Add a stat_add() variant to count them all.

Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slub.c