mirror of
https://github.com/torvalds/linux.git
synced 2026-09-14 08:01:12 +02:00
mm: move struct slabobj_ext to mm/slab.h
Users of include/linux/memcontrol.h don't need to see this internal structure. Further changes to the struct will reduce recompiling. Reviewed-by: Suren Baghdasaryan <surenb@google.com> Reviewed-by: Harry Yoo (Oracle) <harry@kernel.org> Reviewed-by: Hao Li <hao.li@linux.dev> Link: https://patch.msgid.link/20260727-b4-objext_split-v3-3-c29ef0f1f257@kernel.org Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
This commit is contained in:
parent
a867ffa398
commit
215bb51fff
|
|
@ -1440,19 +1440,6 @@ static inline void mem_cgroup_flush_workqueue(void) { }
|
|||
static inline int mem_cgroup_init(void) { return 0; }
|
||||
#endif /* CONFIG_MEMCG */
|
||||
|
||||
/*
|
||||
* Extended information for slab objects stored as an array in page->memcg_data
|
||||
* if MEMCG_DATA_OBJEXTS is set.
|
||||
*/
|
||||
struct slabobj_ext {
|
||||
#ifdef CONFIG_MEMCG
|
||||
struct obj_cgroup *objcg;
|
||||
#endif
|
||||
#ifdef CONFIG_MEM_ALLOC_PROFILING
|
||||
union codetag_ref ref;
|
||||
#endif
|
||||
} __aligned(8);
|
||||
|
||||
static inline struct lruvec *parent_lruvec(struct lruvec *lruvec)
|
||||
{
|
||||
struct mem_cgroup *memcg;
|
||||
|
|
|
|||
13
mm/slab.h
13
mm/slab.h
|
|
@ -549,6 +549,19 @@ static inline bool need_kmalloc_no_objext(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* Extended information for slab objects stored as an array in page->memcg_data
|
||||
* if MEMCG_DATA_OBJEXTS is set.
|
||||
*/
|
||||
struct slabobj_ext {
|
||||
#ifdef CONFIG_MEMCG
|
||||
struct obj_cgroup *objcg;
|
||||
#endif
|
||||
#ifdef CONFIG_MEM_ALLOC_PROFILING
|
||||
union codetag_ref ref;
|
||||
#endif
|
||||
} __aligned(8);
|
||||
|
||||
#ifdef CONFIG_SLAB_OBJ_EXT
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user