[PATCH RFC 10/12] mm/slab: reduce slabobj_ext memory with allocation profiling disabled
"Vlastimil Babka (SUSE)" <[email protected]>
| Newsgroups | org.kernel.vger.cgroups,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
When memory allocation profiling is compiled in but permanently disabled on boot with (implicit or explicit) "never" parameter, stop allocating (wasting) memory for the codetag_ref parts of slabobj_ext metadata. Signed-off-by: Vlastimil Babka (SUSE) <[email protected]> --- mm/slab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slab.h b/mm/slab.h index dcca86799fc9..a50347c9dbe3 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -587,7 +587,7 @@ static inline size_t static_obj_ext_size(void) if (IS_ENABLED(CONFIG_MEMCG)) sz += 1; - if (IS_ENABLED(CONFIG_MEM_ALLOC_PROFILING)) + if (slab_obj_ext_has_codetag()) sz += 1; return sizeof(struct slabobj_ext) * sz; -- 2.55.0