From: Eric Dumazet <eric.dumazet@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
Alexei Starovoitov <ast@kernel.org>
Cc: netdev <netdev@vger.kernel.org>
Subject: [PATCH net] test_bpf: reduce MAX_TESTRUNS
Date: Wed, 28 Feb 2018 08:39:20 -0800 [thread overview]
Message-ID: <1519835960.30253.3.camel@gmail.com> (raw)
In-Reply-To: <1519690325.3258.12.camel@gmail.com>
From: Eric Dumazet <edumazet@google.com>
For tests that are using the maximal number of BPF instruction, each
run takes 20 usec. Looping 10,000 times on them totals 200 ms, which
is bad when the loop is not preemptible.
test_bpf: #264 BPF_MAXINSNS: Call heavy transformations jited:1 19248
18548 PASS
test_bpf: #269 BPF_MAXINSNS: ld_abs+get_processor_id jited:1 20896 PASS
Lets divide by ten the number of iterations, so that max latency is
20ms. We could use need_resched() to break the loop earlier if we
believe 20 ms is too much.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
lib/test_bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/test_bpf.c b/lib/test_bpf.c
index b4e22345963f339ffe05c974bc111ae7da9dc58f..d8dc618b223bb5168b0c7e9d9f4316eef3fbfa34 100644
--- a/lib/test_bpf.c
+++ b/lib/test_bpf.c
@@ -27,7 +27,7 @@
/* General test specific settings */
#define MAX_SUBTESTS 3
-#define MAX_TESTRUNS 10000
+#define MAX_TESTRUNS 1000
#define MAX_DATA 128
#define MAX_INSNS 512
#define MAX_K 0xffffFFFF
next prev parent reply other threads:[~2018-02-28 16:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 18:52 [PATCH] test_bpf: add a schedule point Eric Dumazet
2018-02-26 20:11 ` Daniel Borkmann
2018-02-27 0:12 ` Eric Dumazet
2018-02-27 8:51 ` Daniel Borkmann
2018-02-28 16:39 ` Eric Dumazet [this message]
2018-02-28 16:51 ` [PATCH net] test_bpf: reduce MAX_TESTRUNS 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=1519835960.30253.3.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).