From patchwork Wed Oct 28 18:45:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 55710 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp117015lbr; Wed, 28 Oct 2015 11:45:40 -0700 (PDT) X-Received: by 10.140.91.135 with SMTP id z7mr26263721qgd.91.1446057940006; Wed, 28 Oct 2015 11:45:40 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id c63si43326784qkh.70.2015.10.28.11.45.38; Wed, 28 Oct 2015 11:45:39 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id CF40961FE6; Wed, 28 Oct 2015 18:45:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 8A37C61FD6; Wed, 28 Oct 2015 18:45:34 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B2D2C61FD9; Wed, 28 Oct 2015 18:45:27 +0000 (UTC) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by lists.linaro.org (Postfix) with ESMTPS id 4BAD861FCC for ; Wed, 28 Oct 2015 18:45:26 +0000 (UTC) Received: by wicll6 with SMTP id ll6so209034086wic.0 for ; Wed, 28 Oct 2015 11:45:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=paA+0X1aL4Pe2WwHdOA5Iv1y1EHAPMNFHdKNndKfaY0=; b=1DI9FCc7eGpMfZBkdsgQIylQ4cUKd6dWtAl55p9qpZIYBkbmBF1ovj4GG2LeG+mfHv twb1FQ3iV6aY8xr0YZDMFmcxKvJ4inwkp0LBX3ZkK0hHcPF2zZfoE5DKOTr2k5tICIjn BXtY6WV10144nAqcVcSqEzLGABg55SN2oDwxPmY3hPpNDvN6r2gHNVReOloo2fVP9vZr +PNydLGAZYaIPduzl/du3BCkWD0eWhvS+xB9oSvYRXebtUV3X0Kz7sBzihDxFkADxS+t QNMxbEjBBACW8SBno6A1fR2TQcVlk7zVnzSOKa0F2npud9YlpzbeARsEtlQWcrAqvGAW yc7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=paA+0X1aL4Pe2WwHdOA5Iv1y1EHAPMNFHdKNndKfaY0=; b=Z7Z/eyVj28nFuRbxAV5L3XSD6U2wAnyIJ4//w5GzibDFgE53o7FdiqcP+CoVedInGq Y0lIg66CyXC11u7Q6f4OT54BYu9pxd8Hg+9+Q4HHrD9qOGyQj7FQvCuDKzDEDR8FG8Nk ++ATqiHo0K1SP74O+5Olr7bwfSnSB5ONA/QxVkxIx+k34AEoMiYum/Vg4s2fYUTPSzwB kKz2kg7mY5RjgnrhGp9AajaCcoG1xraJUTJss5558SdSJea4+nbIxdWTxQFRDnrteshP Bmdcnhd1dYZ/Z6OWuCBeYHy0Md1HWl4L3hjv4F+UiE0Z99uPz/RNFBu5VOVFHwzggqjF pQGw== X-Gm-Message-State: ALoCoQlJkbip53rk3CSZ+WeXX37AqI5rhgrsuWj2tqHOvLVM+5Nr1J/f4r/NT+FoV6CfsPXqcBU2 X-Received: by 10.28.140.211 with SMTP id o202mr2379799wmd.73.1446057925498; Wed, 28 Oct 2015 11:45:25 -0700 (PDT) Received: from e106441.emea.arm.com ([2001:41d0:a:3cb4::abcd]) by smtp.gmail.com with ESMTPSA id ju5sm26553440wjc.1.2015.10.28.11.45.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Oct 2015 11:45:24 -0700 (PDT) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Wed, 28 Oct 2015 18:45:07 +0000 Message-Id: <1446057907-20527-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCH] test/performance: pktio: perform an initial warmup run X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" The results from the initial test run are often worse than would normally be expected due to there being no warm up phase. As a simple way to warm up run first test stage twice, ignoring the results of the first run. Signed-off-by: Stuart Haslam --- test/performance/odp_pktio_perf.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/performance/odp_pktio_perf.c b/test/performance/odp_pktio_perf.c index efd26dc..38d684a 100644 --- a/test/performance/odp_pktio_perf.c +++ b/test/performance/odp_pktio_perf.c @@ -134,6 +134,7 @@ typedef struct { uint64_t pps_curr; /* Current attempted PPS */ uint64_t pps_pass; /* Highest passing PPS */ uint64_t pps_fail; /* Lowest failing PPS */ + int warmup; /* Warmup stage - ignore results */ } test_status_t; /* Thread specific arguments */ @@ -647,7 +648,10 @@ static int run_test_single(odp_cpumask_t *thd_mask_tx, /* wait for receivers */ odph_linux_pthread_join(&thd_tbl[0], num_rx_workers); - return process_results(expected_tx_cnt, status); + if (!status->warmup) + return process_results(expected_tx_cnt, status); + + return 1; } static int run_test(void) @@ -659,6 +663,7 @@ static int run_test(void) .pps_curr = gbl_args->args.pps, .pps_pass = 0, .pps_fail = 0, + .warmup = 1, }; if (setup_txrx_masks(&txmask, &rxmask) != 0) @@ -679,6 +684,10 @@ static int run_test(void) printf("%s ", gbl_args->args.ifaces[i]); printf("\n"); + /* first time just run the test but throw away the results */ + run_test_single(&txmask, &rxmask, &status); + status.warmup = 0; + while (ret > 0) ret = run_test_single(&txmask, &rxmask, &status); @@ -957,7 +966,6 @@ static void parse_args(int argc, char *argv[], test_args_t *args) LOG_ABORT("Failed to alloc iface storage\n"); strcpy(args->if_str, optarg); - for (token = strtok(args->if_str, ","); token != NULL && args->num_ifaces < MAX_NUM_IFACES; token = strtok(NULL, ","))