From: Honggang Li Date: Tue, 12 Aug 2014 13:36:15 +0000 (+0800) Subject: percpu: free percpu allocation info for uniprocessor system X-Git-Tag: v3.16.4~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6baa29b62446f4b79e59494e2a54473c94eb8424;p=thirdparty%2Fkernel%2Fstable.git percpu: free percpu allocation info for uniprocessor system commit 3189eddbcafcc4d827f7f19facbeddec4424eba8 upstream. Currently, only SMP system free the percpu allocation info. Uniprocessor system should free it too. For example, one x86 UML virtual machine with 256MB memory, UML kernel wastes one page memory. Signed-off-by: Honggang Li Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman --- diff --git a/mm/percpu.c b/mm/percpu.c index 2ddf9a990dbd0..492f601df4730 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1933,6 +1933,8 @@ void __init setup_per_cpu_areas(void) if (pcpu_setup_first_chunk(ai, fc) < 0) panic("Failed to initialize percpu areas."); + + pcpu_free_alloc_info(ai); } #endif /* CONFIG_SMP */