summaryrefslogtreecommitdiff
path: root/mm/slab.h
diff options
context:
space:
mode:
authorShakeel Butt <shakeel.butt@linux.dev>2024-04-20 16:25:05 -0700
committerAndrew Morton <akpm@linux-foundation.org>2024-05-05 17:53:44 -0700
commit91882c1617c15eb2a4e996b0822e0b9cbd854dea (patch)
treeec1a4a35ba26774ef2934dc1e56c73c3db7d986b /mm/slab.h
parent6ed31ba3921162ef5d4f2f99b91681e8fd24ff34 (diff)
memcg: simple cleanup of stats update functions
mod_memcg_lruvec_state() is never called from outside of memcontrol.c and with always irq disabled. So, replace it with the irq disabled version and add an assert that irq is disabled in the caller. Similarly mod_objcg_state() is not called from outside of memcontrol.c, so simply make it static and change it's name to __mod_objcg_state(). Link: https://lkml.kernel.org/r/20240420232505.2768428-1-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt <shakeel.butt@linux.dev> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: T.J. Mercier <tjmercier@google.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Muchun Song <muchun.song@linux.dev> Cc: Roman Gushchin <roman.gushchin@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/slab.h')
-rw-r--r--mm/slab.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/mm/slab.h b/mm/slab.h
index 411251b9bdd1..d12fb4392e35 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -581,8 +581,6 @@ bool __memcg_slab_post_alloc_hook(struct kmem_cache *s, struct list_lru *lru,
gfp_t flags, size_t size, void **p);
void __memcg_slab_free_hook(struct kmem_cache *s, struct slab *slab,
void **p, int objects, struct slabobj_ext *obj_exts);
-void mod_objcg_state(struct obj_cgroup *objcg, struct pglist_data *pgdat,
- enum node_stat_item idx, int nr);
#endif
size_t __ksize(const void *objp);