diff options
| author | Martin KaFai Lau <[email protected]> | 2020-06-17 10:42:26 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2020-06-18 14:41:09 -0700 |
| commit | 7c7982cbadbb63eb76401ddc4ef090cf7ae274b4 (patch) | |
| tree | ec72373aaeaa183802cb6cc4bd46feb2098541aa /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | 7bd3a33ae6d2b820bc44a206f9b81b96840219fd (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 <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: John Fastabend <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions