diff options
author | Alexei Starovoitov <ast@kernel.org> | 2022-03-21 04:55:05 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-03-21 04:55:05 +0300 |
commit | 30630e44b6580f17724b6c5921a2a540bf06d6af (patch) | |
tree | 0960e83c84bc5ed35c9930c2472c8e172f736197 /block/ioprio.c | |
parent | a8fee96202e279441d0e52d83eb100bd4a6d6272 (diff) | |
parent | 0e790cbb1af97473d3ea53616f8584a71f80fc3b (diff) | |
download | linux-30630e44b6580f17724b6c5921a2a540bf06d6af.tar.xz |
Merge branch 'Enable non-atomic allocations in local storage'
Joanne Koong says:
====================
From: Joanne Koong <joannelkoong@gmail.com>
Currently, local storage memory can only be allocated atomically
(GFP_ATOMIC). This restriction is too strict for sleepable bpf
programs.
In this patchset, sleepable programs can allocate memory in local
storage using GFP_KERNEL, while non-sleepable programs always default to
GFP_ATOMIC.
v3 <- v2:
* Add extra case to local_storage.c selftest to test associating multiple
elements with the local storage, which triggers a GFP_KERNEL allocation in
local_storage_update().
* Cast gfp_t to __s32 in verifier to fix the sparse warnings
v2 <- v1:
* Allocate the memory before/after the raw_spin_lock_irqsave, depending
on the gfp flags
* Rename mem_flags to gfp_flags
* Reword the comment "*mem_flags* is set by the bpf verifier" to
"*gfp_flags* is a hidden argument provided by the verifier"
* Add a sentence to the commit message about existing local storage
selftests covering both the GFP_ATOMIC and GFP_KERNEL paths in
bpf_local_storage_update.
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'block/ioprio.c')
0 files changed, 0 insertions, 0 deletions