Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17C58C04AAD for ; Tue, 7 May 2019 06:50:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E637A20C01 for ; Tue, 7 May 2019 06:50:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726538AbfEGGuB (ORCPT ); Tue, 7 May 2019 02:50:01 -0400 Received: from ozlabs.org ([203.11.71.1]:41283 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725839AbfEGGuB (ORCPT ); Tue, 7 May 2019 02:50:01 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 44yqwl0wf4z9sB8; Tue, 7 May 2019 16:49:58 +1000 (AEST) From: Michael Ellerman To: Daniel Borkmann Cc: bpf@vger.kernel.org, netdev@vger.kernel.org Subject: Re: selftests/bpf/test_tag takes ~30 minutes? In-Reply-To: References: <87bm0nbpdu.fsf@concordia.ellerman.id.au> Date: Tue, 07 May 2019 16:49:58 +1000 Message-ID: <87pnouwyg9.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Daniel Borkmann writes: > On 04/30/2019 03:21 PM, Michael Ellerman wrote: >> Hi Daniel, >> >> I'm running selftests/bpf/test_tag and it's taking roughly half an hour >> to complete, is that expected? >> >> I don't really grok what the test is doing TBH, but it does appear to be >> doing it 5 times :) >> >> for (i = 0; i < 5; i++) { >> do_test(&tests, 2, -1, bpf_gen_imm_prog); >> do_test(&tests, 3, fd_map, bpf_gen_map_prog); >> } >> >> Could we make it just do one iteration by default? That would hopefully >> reduce the runtime by quite a bit. It could take a parameter to run the >> longer version perhaps? > > On my 2.5 years old laptop it's taking 16 seconds. ;) Hrm. I guess I need to dig into why it's taking so long then :) Today it takes 10s on the same machine :/ Is it affected by the BPF JIT being enabled/disabled? cheers