mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
percpu: allow select gfp to be passed to underlying allocators
The prior patch added support for passing gfp flags through to the underlying allocators. This patch allows users to pass along gfp flags (currently only __GFP_NORETRY and __GFP_NOWARN) to the underlying allocators. This should allow users to decide if they are ok with failing allocations recovering in a more graceful way. Additionally, gfp passing was done as additional flags in the previous patch. Instead, change this to caller passed semantics. GFP_KERNEL is also removed as the default flag. It continues to be used for internally caused underlying percpu allocations. V2: Removed gfp_percpu_mask in favor of doing it inline. Removed GFP_KERNEL as a default flag for __alloc_percpu_gfp. Signed-off-by: Dennis Zhou <[email protected]> Suggested-by: Daniel Borkmann <[email protected]> Acked-by: Christoph Lameter <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
This commit is contained in:
parent
47504ee04b
commit
554fef1c39
3 changed files with 10 additions and 12 deletions
|
|
@ -56,7 +56,7 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp)
|
|||
if (!chunk)
|
||||
return NULL;
|
||||
|
||||
pages = alloc_pages(gfp | GFP_KERNEL, order_base_2(nr_pages));
|
||||
pages = alloc_pages(gfp, order_base_2(nr_pages));
|
||||
if (!pages) {
|
||||
pcpu_free_chunk(chunk);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue