Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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 <daniel@iogearbox.net>
Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Signed-off-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5a67da2a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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))
			cpu_relax();
			cond_resched();
	}

	for (i = 0; i < dtab->map.max_entries; i++) {