percpu: split __pcpu_balance_workfn()
__pcpu_balance_workfn() became fairly big and hard to follow, but in fact it consists of two fully independent parts, responsible for the destruction of excessive free chunks and population of necessarily amount of free pages. In order to simplify the code and prepare for adding of a new functionality, split it in two functions: 1) pcpu_balance_free, 2) pcpu_balance_populated. Move the taking/releasing of the pcpu_alloc_mutex to an upper level to keep the current synchronization in place. Signed-off-by: NRoman Gushchin <guro@fb.com> Reviewed-by: NDennis Zhou <dennis@kernel.org> Signed-off-by: NDennis Zhou <dennis@kernel.org>
Showing
想要评论请 注册 或 登录