projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a67da2
)
bpf: devmap, use cond_resched instead of cpu_relax
author
John Fastabend
<
[email protected]
>
Fri, 8 Sep 2017 21:01:10 +0000
(14:01 -0700)
committer
David S. Miller
<
[email protected]
>
Sat, 9 Sep 2017 04:11:00 +0000
(21:11 -0700)
Be a bit more friendly about waiting for flush bits to complete.
Replace the cpu_relax() with a cond_resched().
Suggested-by: Daniel Borkmann <
[email protected]
>
Acked-by: Daniel Borkmann <
[email protected]
>
Signed-off-by: John Fastabend <
[email protected]
>
Acked-by: Alexei Starovoitov <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
kernel/bpf/devmap.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/devmap.c
b/kernel/bpf/devmap.c
index ecf9f99ecc579e315f4651032a8b39415d5b4d81..959c9a07f318b14f6ab4719973f6010de061aadc 100644
(file)
--- a/
kernel/bpf/devmap.c
+++ b/
kernel/bpf/devmap.c
@@
-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))
- c
pu_relax
();
+ c
ond_resched
();
}
for (i = 0; i < dtab->map.max_entries; i++) {