projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca36960
)
test_bpf: add a schedule point
author
Eric Dumazet
<edumazet@google.com>
Mon, 26 Feb 2018 18:52:46 +0000
(10:52 -0800)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Mon, 26 Feb 2018 20:06:56 +0000
(21:06 +0100)
test_bpf() is taking 1.6 seconds nowadays, it is time
to add a schedule point in it.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
lib/test_bpf.c
patch
|
blob
|
history
diff --git
a/lib/test_bpf.c
b/lib/test_bpf.c
index
b4e2234
..
e6f5506
100644
(file)
--- a/
lib/test_bpf.c
+++ b/
lib/test_bpf.c
@@
-24,6
+24,7
@@
#include <linux/if_vlan.h>
#include <linux/random.h>
#include <linux/highmem.h>
+#include <linux/sched.h>
/* General test specific settings */
#define MAX_SUBTESTS 3
@@
-6582,6
+6583,7
@@
static __init int test_bpf(void)
struct bpf_prog *fp;
int err;
+ cond_resched();
if (exclude_test(i))
continue;