From patchwork Thu Aug 30 10:00:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 145535 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp616892ljw; Thu, 30 Aug 2018 03:02:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYT+FYDEzrupUWqJOO2V5/V6veyxmST6TYeicDM8lnVKZSGTXSIWJikqPgVT3KXcwLnYE8L X-Received: by 2002:aed:27de:: with SMTP id m30-v6mr10526923qtg.303.1535623342025; Thu, 30 Aug 2018 03:02:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535623342; cv=none; d=google.com; s=arc-20160816; b=BOjUSpknpl5XhTxBvqmpIaBCZuwEuY58aPnvo4NVsiOcbqju8Msth6XMxnKgfr4TWh 5TqE1KIw8LmjOMzMOC4EetUTfArm2S782IL9YS2BRwrq+/lzH74TiHcwusIBsngdR0jk IQ5lMPtkeONnsQK1O2izAbaA6AbivXsW4Q8XqXb9gWRptYp+FywhiP4lmiKsV9T2KVf8 8XNhiFbK+l7HNFcPhd3kzJdt3s2qFdbp408rsve2SmdoBiHyeqj0kcRE8DZCytfUpVeR HNZY0Gp9s3Pt/GmKjdKX6Abfx4IThAsh72aXMhRcNM0ycpqPbJ0+tHs6ymkMCxFSAMhb NEVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=r3q2s6dXFpdi3d7++ly1C7RECpWcoaU7x+CBs/lpMMY=; b=ptrPJXzBawQVWv8L1RGs6y5TsVcjoQJdTOQRav4lLftHQf3dYAsr0o0VWlAN9GxYiV S+Pi7m/b2XN1i1cG9CdRibmD0i6k/hoV2RX725ssJ22SxAuE6UFkBV4GIpKbDTKfo0Gk ceTEaySuXY8S2s/U5/yvQAiNCXpjk0Yp4NdoPqWMCvBN0B0GKzbk6vW3Vf6b6IQXg3Bg 9b70OG7rxJkY9NC2c6vPe1Yj3RtSzmGY3FD+ZtYxHf5xcMSZQg1jFPx3b5J1ptyL/nwd 6L9EYPhrql096uGgRk84tlWbArloi8u6LsZ2okxL9kcxaMHjUc9eGW5PyAdn3c3d5OYW DJKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id o2-v6si3095336qki.247.2018.08.30.03.02.21; Thu, 30 Aug 2018 03:02:22 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 9380661720; Thu, 30 Aug 2018 10:02:21 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW 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 B4815609A4; Thu, 30 Aug 2018 10:00:42 +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 BB2C761840; Thu, 30 Aug 2018 10:00:16 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id B676660F48 for ; Thu, 30 Aug 2018 10:00:12 +0000 (UTC) Received: from mxback1g.mail.yandex.net (mxback1g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:162]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 5040518611C for ; Thu, 30 Aug 2018 13:00:09 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback1g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ihR62Jwwyo-0970wskX; Thu, 30 Aug 2018 13:00:09 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id KOCrzhFGB0-08nODONt; Thu, 30 Aug 2018 13:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 30 Aug 2018 10:00:04 +0000 Message-Id: <1535623206-484-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535623206-484-1-git-send-email-odpbot@yandex.ru> References: <1535623206-484-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 687 Subject: [lng-odp] [PATCH v1 1/3] test: sched_perf: total number of queues option 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen Change -q option to be the total number of queues with events. There's no need to limit the number of queues to a multiple of worker thread count. Also, add an option for number of dummy (empty) queues. This enables testing scheduler performance when all created queues are not used. Signed-off-by: Petri Savolainen --- /** Email created from pull request 687 (psavol:master-test-sched-perf-options) ** https://github.com/Linaro/odp/pull/687 ** Patch: https://github.com/Linaro/odp/pull/687.patch ** Base sha: 97fc51b1e5b3fcea9db99ba63c10bda47f79341a ** Merge commit sha: b10a9d3318c78101ad4c590deb3d4be6ad7b3cc1 **/ test/performance/odp_sched_perf.c | 42 +++++++++++++++++++------------ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/test/performance/odp_sched_perf.c b/test/performance/odp_sched_perf.c index ac2b9005b..d5fceede9 100644 --- a/test/performance/odp_sched_perf.c +++ b/test/performance/odp_sched_perf.c @@ -14,12 +14,12 @@ #include #include -#define MAX_QUEUES_PER_CPU 1024 -#define MAX_QUEUES (ODP_THREAD_COUNT_MAX * MAX_QUEUES_PER_CPU) +#define MAX_QUEUES (256 * 1024) typedef struct test_options_t { uint32_t num_cpu; uint32_t num_queue; + uint32_t num_dummy; uint32_t num_event; uint32_t num_round; uint32_t max_burst; @@ -60,10 +60,11 @@ static void print_usage(void) "Usage: odp_sched_perf [options]\n" "\n" " -c, --num_cpu Number of CPUs (worker threads). 0: all available CPUs. Default: 1.\n" - " -q, --num_queue Number of queues per CPU. Default: 1.\n" - " -e, --num_event Number of events per queue\n" + " -q, --num_queue Number of queues. Default: 1.\n" + " -d, --num_dummy Number of empty queues. Default: 0.\n" + " -e, --num_event Number of events per queue. Default: 100.\n" " -r, --num_round Number of rounds\n" - " -b, --burst Maximum number of events per operation\n" + " -b, --burst Maximum number of events per operation. Default: 100.\n" " -t, --type Queue type. 0: parallel, 1: atomic, 2: ordered. Default: 0.\n" " -h, --help This help\n" "\n"); @@ -78,6 +79,7 @@ static int parse_options(int argc, char *argv[], test_options_t *test_options) static const struct option longopts[] = { {"num_cpu", required_argument, NULL, 'c'}, {"num_queue", required_argument, NULL, 'q'}, + {"num_dummy", required_argument, NULL, 'd'}, {"num_event", required_argument, NULL, 'e'}, {"num_round", required_argument, NULL, 'r'}, {"burst", required_argument, NULL, 'b'}, @@ -86,10 +88,11 @@ static int parse_options(int argc, char *argv[], test_options_t *test_options) {NULL, 0, NULL, 0} }; - static const char *shortopts = "+c:q:e:r:b:t:h"; + static const char *shortopts = "+c:q:d:e:r:b:t:h"; test_options->num_cpu = 1; test_options->num_queue = 1; + test_options->num_dummy = 0; test_options->num_event = 100; test_options->num_round = 100000; test_options->max_burst = 100; @@ -108,6 +111,9 @@ static int parse_options(int argc, char *argv[], test_options_t *test_options) case 'q': test_options->num_queue = atoi(optarg); break; + case 'd': + test_options->num_dummy = atoi(optarg); + break; case 'e': test_options->num_event = atoi(optarg); break; @@ -129,15 +135,15 @@ static int parse_options(int argc, char *argv[], test_options_t *test_options) } } - if (test_options->num_queue > MAX_QUEUES_PER_CPU) { - printf("Error: Too many queues per worker. Max supported %i\n.", - MAX_QUEUES_PER_CPU); + if ((test_options->num_queue + test_options->num_dummy) > MAX_QUEUES) { + printf("Error: Too many queues. Max supported %i\n.", + MAX_QUEUES); ret = -1; } - test_options->tot_queue = test_options->num_queue * - test_options->num_cpu; - test_options->tot_event = test_options->tot_queue * + test_options->tot_queue = test_options->num_queue + + test_options->num_dummy; + test_options->tot_event = test_options->num_queue * test_options->num_event; return ret; @@ -182,6 +188,7 @@ static int create_pool(test_global_t *global) test_options_t *test_options = &global->test_options; uint32_t num_cpu = test_options->num_cpu; uint32_t num_queue = test_options->num_queue; + uint32_t num_dummy = test_options->num_dummy; uint32_t num_event = test_options->num_event; uint32_t num_round = test_options->num_round; uint32_t max_burst = test_options->max_burst; @@ -190,11 +197,12 @@ static int create_pool(test_global_t *global) printf("\nScheduler performance test\n"); printf(" num cpu %u\n", num_cpu); - printf(" queues per cpu %u\n", num_queue); + printf(" num queues %u\n", num_queue); + printf(" num empty queues %u\n", num_dummy); + printf(" total queues %u\n", tot_queue); printf(" events per queue %u\n", num_event); printf(" max burst size %u\n", max_burst); - printf(" num queues %u\n", tot_queue); - printf(" num events %u\n", tot_event); + printf(" total events %u\n", tot_event); printf(" num rounds %u\n", num_round); if (odp_pool_capability(&pool_capa)) { @@ -234,6 +242,7 @@ static int create_queues(test_global_t *global) uint32_t i, j; test_options_t *test_options = &global->test_options; uint32_t num_event = test_options->num_event; + uint32_t num_queue = test_options->num_queue; uint32_t tot_queue = test_options->tot_queue; int type = test_options->queue_type; odp_pool_t pool = global->pool; @@ -285,7 +294,8 @@ static int create_queues(test_global_t *global) } } - for (i = 0; i < tot_queue; i++) { + /* Store events into queues. Dummy queues are left empty. */ + for (i = 0; i < num_queue; i++) { queue = global->queue[i]; for (j = 0; j < num_event; j++) { From patchwork Thu Aug 30 10:00:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 145534 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp615899ljw; Thu, 30 Aug 2018 03:01:35 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb9JTjGqrfUe1KKGUfKTjCY31XRnSnbXcjotYEYQzdsXTcmucWpOWXWt1Td2qwONoGheqJS X-Received: by 2002:a0c:ae71:: with SMTP id z46-v6mr10592622qvc.108.1535623294911; Thu, 30 Aug 2018 03:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535623294; cv=none; d=google.com; s=arc-20160816; b=Xd/20pEF/7sKSGJ3sqoWjWQ3T+ntb13i2dhoPj3Jgk+O6eA2vq+jFGzxUavnd/SOo0 kMa42Ip+X1tA8ESCDo9IkLS2zOBRRuZVnyIEvVKtI7XLVlmZxxd2MpW6H+b1VxPpKpy9 mSy/yjzNOifhLgmEC1lV4cFSTpJN1vBnyNkLWcyeUWzIrUw/Fvvyb4RvGukpzjhw5exN cyAIkUIGrGsrTcmriALuj2JklUsNuRGtaf68n8Lziq9QvtySlwmX8goEW5GOLMnXpeG9 ZG/KHunxad8Mq5wcIDSwziWbcyZiGevCeDSll1Gt5FQsUTqpt2ck0cCRt0baOg9QlTQm hFpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=Iwe6Ej+UWEy5aJ8g2lfIZXPEr45a1M8pbBAYxVtiqhg=; b=Csw0ya96iWXkNrODmZnGdaNbTS50duWav9oJNOtK9gesgtLuSaGLN3MNOBVgkZLne9 jzKT+nCbrEcs87KqbalfMLQyPzNPbU7MdQf05JVXuLAVtuZmnn19LcNGnL99Xp9j4OI8 wvka3uItIdGxTHLFeBbFafczdx/1JCx8vrRSGJ3Gxo/yoK0eueCFw3wEFuRgHZLG/J/q eBFWndpBVHwMW6JH3o8fdpX+dejKPVTrSDlq3dCG3h2YNC1LXHOtCAsK8XkhocNldHz/ WQj8dufuOpq1FkMwIoARY5Lh2fZufFbo/5Gq7zaRRD3AhiNpvmBTE3sPIy9oRJQyVkW7 Eoaw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id z65-v6si3446167qtc.182.2018.08.30.03.01.34; Thu, 30 Aug 2018 03:01:34 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 800EC685C2; Thu, 30 Aug 2018 10:01:34 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW 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 1A3AE616F4; Thu, 30 Aug 2018 10:00:29 +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 60E8C61840; Thu, 30 Aug 2018 10:00:13 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id C89DB60F30 for ; Thu, 30 Aug 2018 10:00:11 +0000 (UTC) Received: from mxback17j.mail.yandex.net (mxback17j.mail.yandex.net [IPv6:2a02:6b8:0:1619::93]) by forward106j.mail.yandex.net (Yandex) with ESMTP id 20953180381A for ; Thu, 30 Aug 2018 13:00:10 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback17j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 8aEDgWdIvH-0AcCAdlK; Thu, 30 Aug 2018 13:00:10 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id KOCrzhFGB0-09n0UBhJ; Thu, 30 Aug 2018 13:00:09 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 30 Aug 2018 10:00:05 +0000 Message-Id: <1535623206-484-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535623206-484-1-git-send-email-odpbot@yandex.ru> References: <1535623206-484-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 687 Subject: [lng-odp] [PATCH v1 2/3] test: sched_perf: add event forward option 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen Added -f option to enable event forwarding between queues. By default, an event is sent back to the queue it was received from. When forwaring is enabled, it's sent to the next queue. Signed-off-by: Petri Savolainen --- /** Email created from pull request 687 (psavol:master-test-sched-perf-options) ** https://github.com/Linaro/odp/pull/687 ** Patch: https://github.com/Linaro/odp/pull/687.patch ** Base sha: 97fc51b1e5b3fcea9db99ba63c10bda47f79341a ** Merge commit sha: b10a9d3318c78101ad4c590deb3d4be6ad7b3cc1 **/ test/performance/odp_sched_perf.c | 36 ++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/test/performance/odp_sched_perf.c b/test/performance/odp_sched_perf.c index d5fceede9..ba16623c9 100644 --- a/test/performance/odp_sched_perf.c +++ b/test/performance/odp_sched_perf.c @@ -24,6 +24,7 @@ typedef struct test_options_t { uint32_t num_round; uint32_t max_burst; int queue_type; + int forward; uint32_t tot_queue; uint32_t tot_event; @@ -66,6 +67,7 @@ static void print_usage(void) " -r, --num_round Number of rounds\n" " -b, --burst Maximum number of events per operation. Default: 100.\n" " -t, --type Queue type. 0: parallel, 1: atomic, 2: ordered. Default: 0.\n" + " -f, --forward 0: Keep event in the original queue, 1: Forward event to the next queue. Default: 0.\n" " -h, --help This help\n" "\n"); } @@ -84,11 +86,12 @@ static int parse_options(int argc, char *argv[], test_options_t *test_options) {"num_round", required_argument, NULL, 'r'}, {"burst", required_argument, NULL, 'b'}, {"type", required_argument, NULL, 't'}, + {"forward", required_argument, NULL, 'f'}, {"help", no_argument, NULL, 'h'}, {NULL, 0, NULL, 0} }; - static const char *shortopts = "+c:q:d:e:r:b:t:h"; + static const char *shortopts = "+c:q:d:e:r:b:t:f:h"; test_options->num_cpu = 1; test_options->num_queue = 1; @@ -97,6 +100,7 @@ static int parse_options(int argc, char *argv[], test_options_t *test_options) test_options->num_round = 100000; test_options->max_burst = 100; test_options->queue_type = 0; + test_options->forward = 0; while (1) { opt = getopt_long(argc, argv, shortopts, longopts, &long_index); @@ -126,6 +130,9 @@ static int parse_options(int argc, char *argv[], test_options_t *test_options) case 't': test_options->queue_type = atoi(optarg); break; + case 'f': + test_options->forward = atoi(optarg); + break; case 'h': /* fall through */ default: @@ -194,6 +201,7 @@ static int create_pool(test_global_t *global) uint32_t max_burst = test_options->max_burst; uint32_t tot_queue = test_options->tot_queue; uint32_t tot_event = test_options->tot_event; + int forward = test_options->forward; printf("\nScheduler performance test\n"); printf(" num cpu %u\n", num_cpu); @@ -204,6 +212,7 @@ static int create_pool(test_global_t *global) printf(" max burst size %u\n", max_burst); printf(" total events %u\n", tot_event); printf(" num rounds %u\n", num_round); + printf(" forward events %i\n", forward ? 1 : 0); if (odp_pool_capability(&pool_capa)) { printf("Error: Pool capa failed.\n"); @@ -298,6 +307,19 @@ static int create_queues(test_global_t *global) for (i = 0; i < num_queue; i++) { queue = global->queue[i]; + if (test_options->forward) { + uint32_t next = i + 1; + + if (next == num_queue) + next = 0; + + if (odp_queue_context_set(queue, &global->queue[next], + sizeof(odp_queue_t))) { + printf("Error: Context set failed %u\n", i); + return -1; + } + } + for (j = 0; j < num_event; j++) { buf = odp_buffer_alloc(pool); @@ -349,10 +371,12 @@ static int test_sched(void *arg) uint64_t events, enqueues; odp_time_t t1, t2; odp_queue_t queue; + odp_queue_t *next; test_global_t *global = arg; test_options_t *test_options = &global->test_options; uint32_t num_round = test_options->num_round; uint32_t max_burst = test_options->max_burst; + int forward = test_options->forward; odp_event_t ev[max_burst]; thr = odp_thread_id(); @@ -378,6 +402,11 @@ static int test_sched(void *arg) events += num; i = 0; + if (odp_unlikely(forward)) { + next = odp_queue_context(queue); + queue = *next; + } + while (num) { num_enq = odp_queue_enq_multi(queue, &ev[i], num); @@ -430,6 +459,11 @@ static int test_sched(void *arg) if (ev[0] == ODP_EVENT_INVALID) break; + if (odp_unlikely(forward)) { + next = odp_queue_context(queue); + queue = *next; + } + odp_queue_enq(queue, ev[0]); } From patchwork Thu Aug 30 10:00:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 145536 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp618459ljw; Thu, 30 Aug 2018 03:03:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbDBvzsJVaxYWl2N887iTwq0jFNCVw9k7JeGL++a3g9ganDHbowb00cSKQ3ZKckpEzZGQhF X-Received: by 2002:a37:9f0c:: with SMTP id i12-v6mr6198456qke.122.1535623423633; Thu, 30 Aug 2018 03:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535623423; cv=none; d=google.com; s=arc-20160816; b=CLvt4QUbTIchKEVG90IUu/4u3AyMSKIL/SYU7+B33fbMzSH5hoPhI8//K9W6OF4W8h /FVu4CpPZ5zeCaEnN3m8gzt1P9rUAp9QAQQ5mBvEQDjtPPX/tMIiZUNi6bOEHwfTcTMc EniymX1rK+92ti+plXxFdGXQy88PvHz5XCDYLu7ssfJhiSkiRjod+0t6a2cVckjOrBGJ RAh9n92U9DHpgyolmlNHTPZBTQmXnFda9dBSMUN6y6HVZqaIBk2UsnW7yocXncX+Snwx Pz3ZitGee6VB6GCOPob3HxFoEk33iD2gxa7tKlyI7nTxd/Fo7gl4MBVRe0awXByphRjL twhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=YIsJvp25T8fQa+8r3nxQnELIupu3Xa57eXrsAX7RyjE=; b=d14KP9EfyLKpNNRMrn2avFzilmjKduf0y7LbR70dlicBlXh+BtvSKcNIGY4u2sZByO R75UWCDEq0dJNkLjlzFXKZuRxYGLUhc9qbo+UGAXdUtMKh0n8SlDI8M+YtOsYPCql4xC uQTQg5nbmxx8eVsWtVZARgo9OIu4+QZXwPJ1m+nJoA938uc70rbscl1RkCHQ2OZ1pTUc FBKJueNobFHqorIIW5e5RkFtQ/YexscbkF6ns9LNGTnh3nuOTOw7TVSmYBxGFvA8Z1z/ ydhb+Kf8P0Znh3sapMD9K0mG+jQY+Mwqf1rXho5CqbJa5w9g45+tHuy8anLfpakth+EG aN+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id w1-v6si4505811qve.52.2018.08.30.03.03.43; Thu, 30 Aug 2018 03:03:43 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 31BB361885; Thu, 30 Aug 2018 10:03:43 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW 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 1E3BF60F48; Thu, 30 Aug 2018 10:01:32 +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 5FCBF60F48; Thu, 30 Aug 2018 10:00:23 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id 321A96173E for ; Thu, 30 Aug 2018 10:00:13 +0000 (UTC) Received: from mxback6o.mail.yandex.net (mxback6o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::20]) by forward103j.mail.yandex.net (Yandex) with ESMTP id B642834C6192 for ; Thu, 30 Aug 2018 13:00:11 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback6o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id zs1XgvdAgs-0Axig7tI; Thu, 30 Aug 2018 13:00:11 +0300 Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id KOCrzhFGB0-0AnmqvqN; Thu, 30 Aug 2018 13:00:10 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 30 Aug 2018 10:00:06 +0000 Message-Id: <1535623206-484-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535623206-484-1-git-send-email-odpbot@yandex.ru> References: <1535623206-484-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 687 Subject: [lng-odp] [PATCH v1 3/3] test: sched_perf: total events per second 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen Added result for events per second over all workers. Signed-off-by: Petri Savolainen --- /** Email created from pull request 687 (psavol:master-test-sched-perf-options) ** https://github.com/Linaro/odp/pull/687 ** Patch: https://github.com/Linaro/odp/pull/687.patch ** Base sha: 97fc51b1e5b3fcea9db99ba63c10bda47f79341a ** Merge commit sha: b10a9d3318c78101ad4c590deb3d4be6ad7b3cc1 **/ test/performance/odp_sched_perf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/performance/odp_sched_perf.c b/test/performance/odp_sched_perf.c index ba16623c9..9bbcde0b7 100644 --- a/test/performance/odp_sched_perf.c +++ b/test/performance/odp_sched_perf.c @@ -554,6 +554,9 @@ static void print_stat(test_global_t *global) (1000.0 * rounds_ave) / nsec_ave); printf(" events per sec: %.3f M\n\n", (1000.0 * events_ave) / nsec_ave); + + printf("TOTAL events per sec: %.3f M\n\n", + (1000.0 * events_sum) / nsec_ave); } int main(int argc, char **argv)