summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorKonstantin Khorenko <khorenko@virtuozzo.com>2026-10-19 18:11:44 +0200
committerAndrew Morton <akpm@linux-foundation.org>2026-10-24 01:56:41 -0700
commitfaaf8b406c5178fc54662c91e7ce687c0c4cb4be (patch)
treedd6f7d9b5819a968b522047cf8607df4efb41c0f /tools/lib/python
parentbdda2887cbf3937c2d0f56589c2124c4167324e1 (diff)
mm/shrinker: allocate shrinker_info_unit from a dedicated kmem_cache
shrinker_info_unit holds BITS_PER_LONG atomic_long_t of deferred work plus a one-word bitmap, 520 bytes on 64-bit. kzalloc_node() takes it from kmalloc-1k, so almost half of every unit is padding. Allocate the units from a cache of their own, sized to the unit. The cache is not cache-line aligned: the counters of a unit already share cache lines between shrinkers, and aligning the unit would only keep neighbouring units off each other's boundary line, at the cost of part of the saving. Link: https://lore.kernel.org/20261019-vstor-144715-shrinker_info_unit-kmem_cache-v3-1-0fb061e09bf4@virtuozzo.com Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Harry Yoo (Meta) <harry@kernel.org> Reviewed-by: Qi Zheng <qi.zheng@linux.dev> Acked-by: Muchun Song <muchun.song@linux.dev> Assisted-by: LLM Cc: Dave Chinner <david@fromorbit.com> Cc: Roman Gushchin <roman.gushchin@linux.dev> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: Shakeel Butt <shakeel.butt@linux.dev>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions