summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka (SUSE) <vbabka@kernel.org>2026-07-27 14:53:57 +0200
committerVlastimil Babka (SUSE) <vbabka@kernel.org>2026-07-31 15:50:47 +0200
commit215bb51fff467cdaa40d2df098a62ed2ae3e212d (patch)
tree5acd80764aa5ae0e646fc420085ac6d78b003ef9
parenta867ffa398f24f22384eb5aa4fac182026b95692 (diff)
downloadlinux-next-215bb51fff467cdaa40d2df098a62ed2ae3e212d.tar.gz
linux-next-215bb51fff467cdaa40d2df098a62ed2ae3e212d.zip
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>
-rw-r--r--include/linux/memcontrol.h13
-rw-r--r--mm/slab.h13
2 files changed, 13 insertions, 13 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index e1f46a0016fc..93869cc35c25 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -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;
diff --git a/mm/slab.h b/mm/slab.h
index 01535e1e2d3c..7bd361447c54 100644
--- a/mm/slab.h
+++ b/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
/*