From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:49062 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932117AbeB1Q6d (ORCPT ); Wed, 28 Feb 2018 11:58:33 -0500 Date: Wed, 28 Feb 2018 11:58:31 -0500 (EST) Message-Id: <20180228.115831.2205738718287193613.davem@davemloft.net> To: eric.dumazet@gmail.com Cc: daniel@iogearbox.net, ast@kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net] test_bpf: reduce MAX_TESTRUNS From: David Miller In-Reply-To: <1519835960.30253.3.camel@gmail.com> References: <1519690325.3258.12.camel@gmail.com> <1519835960.30253.3.camel@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Wed, 28 Feb 2018 08:39:20 -0800 > 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 Acked-by: David S. Miller