From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 42361A04AE; Mon, 4 May 2020 22:50:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C99641D534; Mon, 4 May 2020 22:50:25 +0200 (CEST) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 952481D52F for ; Mon, 4 May 2020 22:50:24 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200504205023euoutp01a20a63d018ae6960d5f0c36752a2d8e1~L7mfspz162971129711euoutp01N for ; Mon, 4 May 2020 20:50:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200504205023euoutp01a20a63d018ae6960d5f0c36752a2d8e1~L7mfspz162971129711euoutp01N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1588625423; bh=GNBjT+9FM5gXyx2JOLXSvXIL5+BzZf2mTDjAREdx+64=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=XgjT2U4ZSlW9AdM5uCW5MlI844eAzc6MRksV4khkBvgvJVWZPucOO7rh5iyLl05aX aAkAbu2ureVfXQmmRePdD47GzqLlPEWjnb0T7BAdxyQnCzJ9Uo5cbUiI/YwoC6BeaJ nT0i5BPw76QdQa0sFBOY4VupG2GymyWdzwmqFHjM= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200504205022eucas1p222d8961e251b83af6c6159d678ca0225~L7me8x1vU3273432734eucas1p2T; Mon, 4 May 2020 20:50:22 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id CE.33.61286.E0080BE5; Mon, 4 May 2020 21:50:22 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200504205021eucas1p2e267316c612bef29baf37d623c291061~L7md7EhBy2899528995eucas1p2u; Mon, 4 May 2020 20:50:21 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200504205021eusmtrp238cf4338803d6675dae5ea99a333e3d2~L7md6jyqy0433704337eusmtrp2W; Mon, 4 May 2020 20:50:21 +0000 (GMT) X-AuditID: cbfec7f2-ef1ff7000001ef66-35-5eb0800e0335 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id CA.F9.08375.D0080BE5; Mon, 4 May 2020 21:50:21 +0100 (BST) Received: from [106.210.88.70] (unknown [106.210.88.70]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200504205021eusmtip1899f882d31ba3e962994a4bb4d80f11d~L7mdW9_NG0110001100eusmtip1t; Mon, 4 May 2020 20:50:21 +0000 (GMT) To: Harry van Haaren , dev@dpdk.org Cc: honnappa.nagarahalli@arm.com, phil.yang@arm.com From: Lukasz Wojciechowski Message-ID: <38e4b29c-4aaa-87f8-8e3f-498d4be2fcf0@partner.samsung.com> Date: Mon, 4 May 2020 22:50:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200501155649.2959-1-harry.van.haaren@intel.com> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIKsWRmVeSWpSXmKPExsWy7djPc7p8DRviDLZcNrB492k7k0Vj/zcW i5lPW9gt1rzvZnZg8Vgzbw2jx68FS1k9Fu95yRTAHMVlk5Kak1mWWqRvl8CV0XViPnNBu3DF 7w+NzA2Me/i7G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MTNjt/M ILaIgL3E5yunmUBsZgFjib3rD7BANExilDi56RU7SIJNwFbiyMyvrCA2r4CbxKTj71lAlrEI qEhcW6IDYooKxEq0XNSEqBCUODnzCVgFJ9D4+dtLIaabSczb/JAZwpaXaN46G8oWl7j1ZD7T BEahWUi6ZyFpmYWkZRaSlgWMLKsYRVJLi3PTc4sN9YoTc4tL89L1kvNzNzEC42fbsZ+bdzBe 2hh8iFGAg1GJhzfi8/o4IdbEsuLK3EOMEhzMSiK8imYb4oR4UxIrq1KL8uOLSnNSiw8xmgJ9 NpFZSjQ5HxjbeSXxhqaG5haWhubG5sZmFkrivB0CB2OEBNITS1KzU1MLUotg+pg4OKUaGPXe zjrDkn8w0yZP0O7yWu2N/isn/z8yMfXECxMXq1+HzI/O23aPd9cb34J2AY/obd+swrkfG+6N Nk5/dupZ9Nbnj++0/K2P2niJt/2rm0a6cK8rz90lMfOSct7Z+//1XZbzN2tx+496k/fSCk/a 5Wv+C1hZLRK0Sf75L/TvyV7Zn8c13u8L8lNiKc5INNRiLipOBAD5BFnXtQIAAA== X-CMS-MailID: 20200504205021eucas1p2e267316c612bef29baf37d623c291061 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200501155607eucas1p2509870b6b5f4cc520dca11888e221b1b X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200501155607eucas1p2509870b6b5f4cc520dca11888e221b1b References: <20200501155649.2959-1-harry.van.haaren@intel.com> Subject: Re: [dpdk-dev] [PATCH] test/service: add perf test for service on app lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" W dniu 01.05.2020 o 17:56, Harry van Haaren pisze: > Add a performance test to the service run on app lcore auto- > test. This test runs the service in a tight loop, and measures > cycles passed, printing the results. It provides a quick cycle > cost value, enabling measuring performance of the function to > run a service on an application lcore. > > Signed-off-by: Harry van Haaren > > --- > > I'm suggesting to merge this patch before the bugfix/C11 patch series, > (v2 currently here: https://protect2.fireeye.com/url?k=fda15556-a06d9cd2-fda0de19-0cc47aa8f5ba-177ac65d20682aa8&q=1&u=http%3A%2F%2Fpatches.dpdk.org%2Fpatch%2F69199%2F ) > as this would enable users to benchmark the "before" and "after" > states of the bugfix/C11 patches easier. > > --- > app/test/test_service_cores.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c > index a922c7ddc..469243314 100644 > --- a/app/test/test_service_cores.c > +++ b/app/test/test_service_cores.c > @@ -789,8 +789,18 @@ service_app_lcore_poll_impl(const int mt_safe) > "MT Unsafe: App core1 didn't return -EBUSY"); > } > > - unregister_all(); > + /* Performance test: call in a loop, and measure tsc() */ > + const uint32_t perf_iters = (1 << 12); > + uint64_t start = rte_rdtsc(); > + for (uint32_t i = 0; i < perf_iters; i++) { > + int err = service_run_on_app_core_func(&id); > + TEST_ASSERT_EQUAL(0, err, "perf test: returned run failure"); > + } > + uint64_t end = rte_rdtsc(); > + printf("perf test for %s: %0.1f cycles per call\n", mt_safe ? > + "MT Safe" : "MT Unsafe", (end - start)/(float)perf_iters); > > + unregister_all(); > return TEST_SUCCESS; > } > Hi Harry, I like the idea of adding this test. I checked it and it works fine. However have you considered adding it as a separate testcase or even better as "service_perf_autotest" command ? With your changes the: service_app_lcore_mt_safe and service_app_lcore_mt_unsafe unit tests cases have multiple functionalities: they test simultaneous execution of service and they do performance checks. Best regards Lukasz -- Lukasz Wojciechowski Principal Software Engineer Samsung R&D Institute Poland Samsung Electronics Office +48 22 377 88 25 l.wojciechow@partner.samsung.com