From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>, netdev <netdev@vger.kernel.org>
Subject: [PATCH] test_bpf: add a schedule point
Date: Mon, 26 Feb 2018 10:52:46 -0800 [thread overview]
Message-ID: <1519671166.3258.10.camel@gmail.com> (raw)
From: Eric Dumazet <edumazet@google.com>
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>
---
lib/test_bpf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index b4e22345963f339ffe05c974bc111ae7da9dc58f..e6f550608d7220f434b45828549d36820923a51d 100644
--- 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;
next reply other threads:[~2018-02-26 18:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 18:52 Eric Dumazet [this message]
2018-02-26 20:11 ` [PATCH] test_bpf: add a schedule point Daniel Borkmann
2018-02-27 0:12 ` Eric Dumazet
2018-02-27 8:51 ` Daniel Borkmann
2018-02-28 16:39 ` [PATCH net] test_bpf: reduce MAX_TESTRUNS Eric Dumazet
2018-02-28 16:51 ` Daniel Borkmann
2018-02-28 16:58 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1519671166.3258.10.camel@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.