From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19A8743D4F6; Wed, 15 Jul 2026 10:10:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784110258; cv=none; b=YAFeDc2fKoa6u5HtX+FGNdS/S6VSPBSXhoWxdeurur/DNF7sCqI4uxX3lUhUVHiHdcpOuRH4FLLfsKgt84LHQORt2D3VFGTKAKUILkl9GWJ3APTWopM/9MaZx33QRtZXXKV0nPRgBySIQeaelxFyw4mC1WifJNsuh6rLKwAO9Iw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784110258; c=relaxed/simple; bh=dZE2O9PBRnVTwF5p+AiswEnJG1rpDiooBHHek8pj880=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JVzB4YMqqCuJpPwOblzQdv6R+8giLriAoUSvYH4vkAXD5qHXh2hwD44YXurzc9wcPKNKry9DkaPcg9zP17uKv1wcwcmlhuuEb/xTZmcdtcd0GZ17aMyw3O9BaL7Zmv9sD4uDdFa2qO6M9PAvanMExqOGkXfHMPZFumrpQ0JWee4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BO3ci8u0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BO3ci8u0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D0A01F00A3D; Wed, 15 Jul 2026 10:10:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1784110257; bh=Zd2tlZhAK+JyDltuF6YOH06qJxcu4D6T9r1FM+zMNoA=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=BO3ci8u0HQ6pL5ko8UnpUJPQ3h5oU4nToGn2Fj2huorQN/JOi/UVrQ2sDXVWVdvR7 kmNChn99zLOSFeZVJuRIptt6ohuJ5v5bu39zz+6yKPXLl6F2+edIbUiim1W/NvsQQU 3tFBlNCjHD4p9rKwU5TkukWDMf6BVokXw0xgxLm5Est9bfLs/yRcgZ+2IgaMAJacmT W/qlxjGt2CW7LFQx3GOtNAzIEHe9iVkS6AFfnIZr/w9ILm0MVTTsb3vj+hEGpM8g12 r8KmSJlxVUwZ4uXtH406TA86kUvtNguuARd0i6T26vW9x5XAJYkJrqbOg7WeS9wxxK lv/T+Crz0otHg== From: "Vlastimil Babka (SUSE)" Date: Wed, 15 Jul 2026 12:10:43 +0200 Subject: [PATCH RFC 03/12] mm: move struct slabobj_ext to mm/slab.h Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260715-b4-objext_split-v1-3-9a49c4ccf4c3@kernel.org> References: <20260715-b4-objext_split-v1-0-9a49c4ccf4c3@kernel.org> In-Reply-To: <20260715-b4-objext_split-v1-0-9a49c4ccf4c3@kernel.org> To: Harry Yoo , Suren Baghdasaryan Cc: Hao Li , Shakeel Butt , Alexander Potapenko , Marco Elver , Andrew Morton , Christoph Lameter , David Rientjes , Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, "Vlastimil Babka (SUSE)" X-Mailer: b4 0.15.2 Users of include/linux/memcontrol.h don't need to see this internal structure. Further changes to the struct will reduce recompiling. Signed-off-by: Vlastimil Babka (SUSE) --- include/linux/memcontrol.h | 13 ------------- mm/slab.h | 13 +++++++++++++ 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 /* -- 2.55.0