Return-Path: Received: from www62.your-server.de ([213.133.104.62]:46356 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753059AbeB1QvV (ORCPT ); Wed, 28 Feb 2018 11:51:21 -0500 Subject: Re: [PATCH net] test_bpf: reduce MAX_TESTRUNS To: Eric Dumazet , Alexei Starovoitov Cc: netdev References: <1519671166.3258.10.camel@gmail.com> <1519690325.3258.12.camel@gmail.com> <1519835960.30253.3.camel@gmail.com> From: Daniel Borkmann Message-ID: <13fbc250-09fe-e9a2-39c2-e151f6cc0dfa@iogearbox.net> Date: Wed, 28 Feb 2018 17:51:14 +0100 MIME-Version: 1.0 In-Reply-To: <1519835960.30253.3.camel@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On 02/28/2018 05:39 PM, Eric Dumazet wrote: > From: Eric Dumazet > > 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 Applied to bpf tree, thanks Eric!