aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/cdns3/cdns3-plat.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <[email protected]>2022-09-02 21:10:58 +0000
committerDaniel Borkmann <[email protected]>2022-09-05 13:33:07 +0000
commit9f2c6e96c65e6fa1aebef546be0c30a5895fcb37 (patch)
treed657c02f101e19b20ed3b720a044606e99f870a3 /drivers/usb/cdns3/cdns3-plat.c
parentbpf: Remove usage of kmem_cache from bpf_mem_cache. (diff)
downloadkernel-9f2c6e96c65e6fa1aebef546be0c30a5895fcb37.tar.gz
kernel-9f2c6e96c65e6fa1aebef546be0c30a5895fcb37.zip
bpf: Optimize rcu_barrier usage between hash map and bpf_mem_alloc.
User space might be creating and destroying a lot of hash maps. Synchronous rcu_barrier-s in a destruction path of hash map delay freeing of hash buckets and other map memory and may cause artificial OOM situation under stress. Optimize rcu_barrier usage between bpf hash map and bpf_mem_alloc: - remove rcu_barrier from hash map, since htab doesn't use call_rcu directly and there are no callback to wait for. - bpf_mem_alloc has call_rcu_in_progress flag that indicates pending callbacks. Use it to avoid barriers in fast path. - When barriers are needed copy bpf_mem_alloc into temp structure and wait for rcu barrier-s in the worker to let the rest of hash map freeing to proceed. Signed-off-by: Alexei Starovoitov <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'drivers/usb/cdns3/cdns3-plat.c')
0 files changed, 0 insertions, 0 deletions