Skip to content

Commit

Permalink
percpu: free percpu allocation info for uniprocessor system
Browse files Browse the repository at this point in the history
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>
Cc: stable@vger.kernel.org
  • Loading branch information
Honggang Li authored and htejun committed Aug 16, 2014
1 parent 849f516 commit 3189edd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mm/percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1932,6 +1932,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 */
Expand Down

0 comments on commit 3189edd

Please sign in to comment.