FROMLIST: memblock: track kernel size on memsize
Some memory regions are already being tracked by previous patches. But there are many memory allocations from memblock and frees to memblock during the boot time. This patch tracks the memblock size used for the common kernel. To to this, tracking memblock size is disabled for some memory handling logics like early param, device tree, and default cma size. For precise kernel size, this patch counts not actually freed size to buddy at boot time, and does not count freed size from ramdisk and init section. Additionally this patch does one important thing. This patch blocks memblock_add_range of memblock_remove_range not to update memsize if free pages were already released to the buddy allocator. This is an example. The kernel size is newly added by this patch. .kernel : 135137 KB .unusable : 788073 KB .reusable : 294912 KB Bug: 340432773 Signed-off-by:Jaewon Kim <jaewon31.kim@samsung.com> Link: https://lore.kernel.org/linux-mm/20240521023957.2587005-8-jaewon31.kim@samsung.com/ Change-Id: Ice0c2aa568385490a3468f7567b4b8c083e043ec
Loading
Please sign in to comment