Commit 374fb014 authored by John Fastabend's avatar John Fastabend Committed by David S. Miller

bpf: devmap, use cond_resched instead of cpu_relax

Be a bit more friendly about waiting for flush bits to complete.
Replace the cpu_relax() with a cond_resched().
Suggested-by: default avatarDaniel Borkmann <[email protected]>
Acked-by: default avatarDaniel Borkmann <[email protected]>
Signed-off-by: default avatarJohn Fastabend <[email protected]>
Acked-by: default avatarAlexei Starovoitov <[email protected]>
Signed-off-by: default avatarDavid S. Miller <[email protected]>
parent 5a67da2a
......@@ -159,7 +159,7 @@ static void dev_map_free(struct bpf_map *map)
unsigned long *bitmap = per_cpu_ptr(dtab->flush_needed, cpu);
while (!bitmap_empty(bitmap, dtab->map.max_entries))
for (i = 0; i < dtab->map.max_entries; i++) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment