From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f47.google.com ([74.125.83.47]:46366 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbeB0AMI (ORCPT ); Mon, 26 Feb 2018 19:12:08 -0500 Received: by mail-pg0-f47.google.com with SMTP id r26so1603402pgv.13 for ; Mon, 26 Feb 2018 16:12:07 -0800 (PST) Message-ID: <1519690325.3258.12.camel@gmail.com> Subject: Re: [PATCH] test_bpf: add a schedule point From: Eric Dumazet To: Daniel Borkmann , Alexei Starovoitov Cc: netdev Date: Mon, 26 Feb 2018 16:12:05 -0800 In-Reply-To: References: <1519671166.3258.10.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 2018-02-26 at 21:11 +0100, Daniel Borkmann wrote: > On 02/26/2018 07:52 PM, Eric Dumazet wrote: > > From: Eric Dumazet > > > > test_bpf() is taking 1.6 seconds nowadays, it is time > > to add a schedule point in it. > > > > Signed-off-by: Eric Dumazet > > Applied to bpf tree, thanks Eric! Thanks Daniel Note that some BPF programs are quite expensive [  173.447471] test_bpf: #264 BPF_MAXINSNS: Call heavy transformations jited:1 19248 18548 PASS jited:1 12519 PASS [  173.509228] test_bpf: #269 BPF_MAXINSNS: ld_abs+get_processor_id jited:1 20896 PASS So we can still consume ~200 ms per test, without cond_resched() Maybe reducing MAX_TESTRUNS from 10000 to 1000 would be the next step ?