summaryrefslogtreecommitdiffstats
path: root/kernel/bpf
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2020-06-17 19:42:26 +0200
committerAlexei Starovoitov <ast@kernel.org>2020-06-18 23:41:09 +0200
commit7c7982cbadbb63eb76401ddc4ef090cf7ae274b4 (patch)
treeec72373aaeaa183802cb6cc4bd46feb2098541aa /kernel/bpf
parentlibbpf: Bump version to 0.1.0 (diff)
downloadlinux-7c7982cbadbb63eb76401ddc4ef090cf7ae274b4.tar.xz
linux-7c7982cbadbb63eb76401ddc4ef090cf7ae274b4.zip
bpf: sk_storage: Prefer to get a free cache_idx
The cache_idx is currently picked by RR. There is chance that the same cache_idx will be picked by multiple sk_storage_maps while other cache_idx is still unused. e.g. It could happen when the sk_storage_map is recreated during the restart of the user space process. This patch tracks the usage count for each cache_idx. There is 16 of them now (defined in BPF_SK_STORAGE_CACHE_SIZE). It will try to pick the free cache_idx. If none was found, it would pick one with the minimal usage count. Signed-off-by: Martin KaFai Lau <kafai@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20200617174226.2301909-1-kafai@fb.com
Diffstat (limited to 'kernel/bpf')
0 files changed, 0 insertions, 0 deletions