]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm: cma: set early_pfn and bitmap as a union in cma_memrange
authorZhongkun He <hezhongkun.hzk@bytedance.com>
Fri, 9 May 2025 08:35:28 +0000 (16:35 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 May 2025 21:55:36 +0000 (14:55 -0700)
commit83b6d498d027002e79c2ce40b5729137500c3170
tree9efa723e86dd3c0d49b9615af1a5d21dff99e570
parent2616b370323a953c437ed2bf40a277e9deaa3709
mm: cma: set early_pfn and bitmap as a union in cma_memrange

Since early_pfn and bitmap are never used at the same time, they can be
defined as a union to reduce the size of the data structure.  This change
can save 8 * u64 entries per CMA.

Link: https://lkml.kernel.org/r/20250509083528.1360952-1-hezhongkun.hzk@bytedance.com
Signed-off-by: Zhongkun He <hezhongkun.hzk@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/cma.c
mm/cma.h