]> git.baikalelectronics.ru Git - kernel.git/commit
percpu: implement [__]alloc_percpu_gfp()
authorTejun Heo <tj@kernel.org>
Tue, 2 Sep 2014 18:46:04 +0000 (14:46 -0400)
committerTejun Heo <tj@kernel.org>
Tue, 2 Sep 2014 18:46:04 +0000 (14:46 -0400)
commitfc7add0d9be9c56c05ae8470906be6294020e994
tree5d0419fff89fc11469be48e5935ebe46c0fb57fa
parent16b04fa3382d948bf4f8edc5224e6ffd4673ffc2
percpu: implement [__]alloc_percpu_gfp()

Now that pcpu_alloc_area() can allocate only from populated areas,
it's easy to add atomic allocation support to [__]alloc_percpu().
Update pcpu_alloc() so that it accepts @gfp and skips all the blocking
operations and allocates only from the populated areas if @gfp doesn't
contain GFP_KERNEL.  New interface functions [__]alloc_percpu_gfp()
are added.

While this means that atomic allocations are possible, this isn't
complete yet as there's no mechanism to ensure that certain amount of
populated areas is kept available and atomic allocations may keep
failing under certain conditions.

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