]> git.hungrycats.org Git - linux/commitdiff
percpu: free percpu allocation info for uniprocessor system
authorHonggang Li <enjoymindful@gmail.com>
Tue, 12 Aug 2014 13:36:15 +0000 (21:36 +0800)
committerZefan Li <lizefan@huawei.com>
Mon, 1 Dec 2014 10:02:23 +0000 (18:02 +0800)
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 <enjoymindful@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
mm/percpu.c

index 13b2eefabfdd31a90151be06730753b85ceefcc4..5f6042b61ca8bed5d80987a8269d6dd73e0e3a88 100644 (file)
@@ -1907,6 +1907,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 */