]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - mm/percpu.c
percpu: allow select gfp to be passed to underlying allocators
authorDennis Zhou <dennisszhou@gmail.com>
Fri, 16 Feb 2018 18:09:58 +0000 (12:09 -0600)
committerTejun Heo <tj@kernel.org>
Sun, 18 Feb 2018 13:33:01 +0000 (05:33 -0800)
commit554fef1c39ee148623a496e04569dabb11463406
treef1d187aad200c97bdf4b0b9f2c1c66735deab08a
parent47504ee04b9241548ae2c28be7d0b01cff3b7aa6
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 <dennisszhou@gmail.com>
Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
mm/percpu-km.c
mm/percpu-vm.c
mm/percpu.c