Re: [PATCH V2 bpf-next] bpf: make __htab_lookup_and_delete_batch faster when map is almost empty

2020-08-01 Thread Yonghong Song
On 8/1/20 11:09 AM, Brian Vazquez wrote: While running some experiments it was observed that map_lookup_batch was 2x slower than get_next_key + lookup when the syscall overhead is minimal. This was because the map_lookup_batch implementation was more expensive traversing empty buckets, this

[PATCH V2 bpf-next] bpf: make __htab_lookup_and_delete_batch faster when map is almost empty

2020-08-01 Thread Brian Vazquez
While running some experiments it was observed that map_lookup_batch was 2x slower than get_next_key + lookup when the syscall overhead is minimal. This was because the map_lookup_batch implementation was more expensive traversing empty buckets, this can be really costly when the pre-allocated map