Thread (3 messages) flat view 3 messages, 3 authors, 2020-06-18

RE: [PATCH bpf-next] bpf: sk_storage: Prefer to get a free cache_idx

From: John Fastabend <john.fastabend@gmail.com>
Date: 2020-06-18 05:01:14
Also in: bpf

Martin KaFai Lau wrote:
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 <redacted>
---
 net/core/bpf_sk_storage.c | 41 +++++++++++++++++++++++++++++++++++----
 1 file changed, 37 insertions(+), 4 deletions(-)
Acked-by: John Fastabend <john.fastabend@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help