diff options
| author | 2026-08-14 15:17:02 +0800 | |
|---|---|---|
| committer | 2026-09-07 17:00:08 +0200 | |
| commit | 0710b29e51efbc7ad2567df429492f86349dd4d8 (patch) | |
| tree | 61dfae980a76b8e890d7082a64c99ee7889157c3 /scripts/Makefile.thinlto | |
| parent | mm/slab_common: reject zero object_size before calculate_alignment (diff) | |
mm/slub: unify slub stat definitions to simplify metric additions
Currently, adding a new slub stat requires modifying three separate
locations: stat_item, STAT_ATTR, and slab_attrs. This is inconvenient,
especially when temporarily adding metrics for debugging during
development.
This patch borrows the approach from SCHED_FEAT by introducing an ITEM_EXP
X-macro, which is then temporarily defined as different operations at the
three locations (stat_item, STAT_ATTR, and slab_attrs) to perform distinct
macro expansions.
Going forward, adding a new metric only requires adding a single line:
ITEM_EXP(XXX, xxx)
Signed-off-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Harry Yoo (Meta) <harry@kernel.org>
Link: https://patch.msgid.link/20260814071848.46922-1-hao.li@linux.dev
Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
