]> git.baikalelectronics.ru Git - kernel.git/commit
percpu: make pcpu_alloc_area() capable of allocating only from populated areas
authorTejun Heo <tj@kernel.org>
Tue, 2 Sep 2014 18:46:02 +0000 (14:46 -0400)
committerTejun Heo <tj@kernel.org>
Tue, 2 Sep 2014 18:46:02 +0000 (14:46 -0400)
commit2a51dd59668cb9e7ad7bbb550a03a0663e992bff
treee3cf6de55397465346f73ecded1e7b4edda4950b
parent18eac281ae513c9705e244e326f0558d613de33b
percpu: make pcpu_alloc_area() capable of allocating only from populated areas

Update pcpu_alloc_area() so that it can skip unpopulated areas if the
new parameter @pop_only is true.  This is implemented by a new
function, pcpu_fit_in_area(), which determines the amount of head
padding considering the alignment and populated state.

@pop_only is currently always false but this will be used to implement
atomic allocation.

Signed-off-by: Tejun Heo <tj@kernel.org>
mm/percpu.c