summaryrefslogtreecommitdiff
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2020-06-17 10:42:26 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-06-18 14:41:09 -0700
commit7c7982cbadbb63eb76401ddc4ef090cf7ae274b4 (patch)
treeec72373aaeaa183802cb6cc4bd46feb2098541aa /arch/mips/kernel
parent7bd3a33ae6d2b820bc44a206f9b81b96840219fd (diff)
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 'arch/mips/kernel')
0 files changed, 0 insertions, 0 deletions