mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
init: defer free large memblock to Buddy allocator when CONFIG_ROCKCHIP_THUNDER_BOOT=y && CONFIG_SMP=y
It's not benefit on UP system.
Fixes: b6cd53a3a2 ("init: defer free large memblock to Buddy allocator when CONFIG_ROCKCHIP_THUNDER_BOOT=y")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I237208a21dc011695df998d546e4d28141ff41e6
This commit is contained in:
@@ -1719,7 +1719,7 @@ static noinline void __init kernel_init_freeable(void)
|
||||
smp_init();
|
||||
sched_init_smp();
|
||||
|
||||
#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT
|
||||
#if defined(CONFIG_ROCKCHIP_THUNDER_BOOT) && defined(CONFIG_SMP)
|
||||
kthread_run(defer_free_memblock, NULL, "defer_mem");
|
||||
#endif
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ struct pglist_data __refdata contig_page_data;
|
||||
EXPORT_SYMBOL(contig_page_data);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT
|
||||
#if defined(CONFIG_ROCKCHIP_THUNDER_BOOT) && defined(CONFIG_SMP)
|
||||
static unsigned long defer_start __initdata;
|
||||
static unsigned long defer_end __initdata;
|
||||
|
||||
@@ -1933,7 +1933,7 @@ static void __init __free_pages_memory(unsigned long start, unsigned long end)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT
|
||||
#if defined(CONFIG_ROCKCHIP_THUNDER_BOOT) && defined(CONFIG_SMP)
|
||||
int __init defer_free_memblock(void *unused)
|
||||
{
|
||||
if (defer_start == 0)
|
||||
@@ -1965,7 +1965,7 @@ static unsigned long __init __free_memory_core(phys_addr_t start,
|
||||
if (start_pfn >= end_pfn)
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_ROCKCHIP_THUNDER_BOOT
|
||||
#if defined(CONFIG_ROCKCHIP_THUNDER_BOOT) && defined(CONFIG_SMP)
|
||||
if ((end - start) > defer_free_block_size) {
|
||||
defer_start = start_pfn;
|
||||
defer_end = end_pfn;
|
||||
|
||||
Reference in New Issue
Block a user