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 E5AEDA00C5; Thu, 7 May 2020 08:28:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 73C011D9B4; Thu, 7 May 2020 08:28:59 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70073.outbound.protection.outlook.com [40.107.7.73]) by dpdk.org (Postfix) with ESMTP id C59571D9B3 for ; Thu, 7 May 2020 08:28:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0c6b0jpoiQd7Yxz/jdF7r4L9QR7vZylxXXZYJg5CNuk=; b=cg58qKrcY0lkj5YmquY94hK6VCWO/Xau+Zl/u+9u2eBlMAulAOFgnXjHA3TJDchoGs2hAqgbvoouqYE/PR/281C9OSgXKOKHuBJlXBUFQyaCtJgSveJs7b7FtQz6xg9/61mrdywAnWLUXrVeJOlVc7xPghg16E/zd754Rsq+Ye0= Received: from AM6PR08CA0002.eurprd08.prod.outlook.com (2603:10a6:20b:b2::14) by AM5PR0801MB1618.eurprd08.prod.outlook.com (2603:10a6:203:37::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.28; Thu, 7 May 2020 06:28:56 +0000 Received: from VE1EUR03FT057.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:b2:cafe::a5) by AM6PR08CA0002.outlook.office365.com (2603:10a6:20b:b2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27 via Frontend Transport; Thu, 7 May 2020 06:28:56 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT057.mail.protection.outlook.com (10.152.19.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27 via Frontend Transport; Thu, 7 May 2020 06:28:55 +0000 Received: ("Tessian outbound ff098c684b24:v54"); Thu, 07 May 2020 06:28:55 +0000 X-CR-MTA-TID: 64aa7808 Received: from 5ab389ec4f5a.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 56BCD4B2-154D-4D81-B8A8-39E8FF6B1790.1; Thu, 07 May 2020 06:28:50 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5ab389ec4f5a.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 07 May 2020 06:28:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a+bURq09cEt4DUS7mPpRcaNcCCR0GHkpGMdcJ36ik54TG2uLgEHBd2NEatJxwugsTnvpP2UXZwJZGzIUi9RH8gbgn/zOJwra/IVbZRCBuZftsHEr0Pl/d7DV0nBLK9WgL09wFPhU56OkiK2H6bOOWJNz+iQe7/YLO+ZrLO4iZjzSr4kbobo5tPwFeah1DHb5VxWdgXI+J2EfbCc/Cwe8PsZc3+5/gT+/tx5t43IdB+NiAmOSz4QNK9LF+W1eKQF12aiuo2c/6CStAeDnyGga+Y/V3rDRiDFJYRCPcaI385eBW2V4Yyd0PxHW9xeAYInfeM/X5iRRX6O35c5S4TT+Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0c6b0jpoiQd7Yxz/jdF7r4L9QR7vZylxXXZYJg5CNuk=; b=WzkIVX6bflN2FbvyM0pXskwPN4zlpBQD70d9xi7jVDW64lP6ywKxvDLmsx83gugcGFlYek0iggIA5LPnLPfem7nOb5r9HG8aRxkkGif96HTAIPCDSV26xKlw2X2R5ookqQy7NJZ0GSjhv7+DOddR13EG1rpTeRrHh4GO16771KvRWjBUEyJz/OTE6i+XrxUWMctqzPcCdbmUtoIjELzbo6EUjetNLxX1RnyKUbM6FagXVeFr4Dc/HyO3RlnSoVN6MtPfMWLH2IvPx5EelXzuCIfCpcrWoFTK5P2o6PIwc+xOMFn+lTF59Z99X9K9/LA0iTqkQ1flrlv4TRLIqFKs1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0c6b0jpoiQd7Yxz/jdF7r4L9QR7vZylxXXZYJg5CNuk=; b=cg58qKrcY0lkj5YmquY94hK6VCWO/Xau+Zl/u+9u2eBlMAulAOFgnXjHA3TJDchoGs2hAqgbvoouqYE/PR/281C9OSgXKOKHuBJlXBUFQyaCtJgSveJs7b7FtQz6xg9/61mrdywAnWLUXrVeJOlVc7xPghg16E/zd754Rsq+Ye0= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (2603:10a6:802:b2::11) by VE1PR08MB5117.eurprd08.prod.outlook.com (2603:10a6:803:109::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.21; Thu, 7 May 2020 06:28:48 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::785b:54ca:be80:7b66]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::785b:54ca:be80:7b66%2]) with mapi id 15.20.2979.028; Thu, 7 May 2020 06:28:48 +0000 From: Phil Yang To: Harry van Haaren , "dev@dpdk.org" CC: "david.marchand@redhat.com" , Honnappa Nagarahalli , nd Thread-Topic: [PATCH v2] test/service: add perf test for service on app lcore Thread-Index: AQHWI8oBd+2n8QJ45Eu1UgniOI2rjaicI38g Date: Thu, 7 May 2020 06:28:48 +0000 Message-ID: References: <20200501155649.2959-1-harry.van.haaren@intel.com> <20200506171642.32105-1-harry.van.haaren@intel.com> In-Reply-To: <20200506171642.32105-1-harry.van.haaren@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 6334c0e0-21a5-4834-8a8a-d88089551990.0 x-checkrecipientchecked: true Authentication-Results-Original: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0a10b60b-6ade-42e2-6dcb-08d7f24feb00 x-ms-traffictypediagnostic: VE1PR08MB5117:|VE1PR08MB5117:|AM5PR0801MB1618: x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:49;OLM:49; x-forefront-prvs: 03965EFC76 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: JUK/gLW1zhdOHRdU78Wrf/b35CIbyQTLXSYqbO9gdPFgMFBmAUwaZU//EJOP/3d8krgFdZ+/C5nNyaL13pFa7hJXidI77IEtRTGoAp6ClYyWtl5d5QLYkOYm/7wvyXwU9MsrHY5Ut8PzIm403hi4kX2ruAHuNFJl92Pukqv8ietSS6vQB5/ZfjV1L0d89KgA+sSWCbhlYcJ6nfsiSxFuSZUJgGLGE3zx5ltWwQxaSrqy6Nerv57yRJ39ibkGcQTcraSyun7c/6u1FIAks5Z7OEXQR9xtY3QZ7kNDxcYSuCDzojYRIEA6PlnwmmnF21u5xhFzxFZeEZIrD1G9Xe+5DIZ73yCISihn/32Bhj6+rfGpn3WnN7h5gUMVnZjq+vomV21bx69GXLf8WH9U51eC2OGfM5WzeFawHxH4w3HJp1STW0bYeKVzYvu7gFhP3dpRbokXVBDo8CUi004C74B0/cN/OJif5vbRr9OglbziA3fNMbc24jO3pI925WcLYdnWnH5C+SsTTmb+xrMpS42k8w== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4640.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(366004)(376002)(346002)(136003)(39860400002)(33430700001)(71200400001)(7696005)(5660300002)(316002)(54906003)(110136005)(2906002)(8676002)(8936002)(83280400001)(83300400001)(83310400001)(83290400001)(83320400001)(26005)(186003)(55236004)(6506007)(52536014)(53546011)(66946007)(33440700001)(66446008)(9686003)(33656002)(4326008)(64756008)(66476007)(55016002)(66556008)(76116006)(86362001)(478600001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: /9XlrsLxUeUwh2q7Sj2N72E8UKjhLzEYdM5pY45LLREHPMCq1LeZ/7nnW8q47hIwJmccile4o3wk5HPPRpxzTNbiPquQ/yGiN7+rExiRUNZbGNshh8U/iiruQPueGVeRyeucEz+Q2iumIdkVmWsH1c2sY8EJiJLO1/Fb6AUlfnaoPGqifi6L6hBfyJYtdmtjIQ08d1GD9+jDXgxh3r2FP19xqU6Rs1UG73fJu4/IhSPVAuJ7TD2rf/7BnXhjSg5CbqgtwVEZoCKaIpOBqz5e0QFp+vcJz7Jovx+3t9RxGQPuusQpBYV/XdddoBPiNFOfjy5jEvNcS2YBTtei34Y3as5LtJPUTFOcWKauY3A7K0PC+pGcfff4XEkJ6MTNIEVPKt3vk2OuN7SR5fOfuYobR6O0XpC9EtBPsdnMcVhFpSKbo3aelIbuthnATdZG1wNi0XjsCXuAkNO2OUJkpO7+BjqxQlgnvDl5igcjyU36stdZ3HfyGxVGZiXJtVIvv3+NFbJX7wWylpklPLBga7UjQ5iDQWAYBeDIVJ4tyb6cfvXNMCbIhyx+JNZfIoC62Gp4mhFogL3mgxLJVEM0giO84kcTddqFD4u1lp1Jt8ihzGvHLWiP088QhBCWg15v+Dd9gvwTXxYILx1USoREy7XmcM3jTlhthINOuqgtMP0mwt/TYUUBpdAju4L5iaA15GieeDeFLCF+Wj0G6UA+WP62E2K4ofezvYsxqmkxKOR6yX8yLX6KOvRo81q+sIRp8JLS5jMFIrp26Sp+Rc896qaIacSxeKu6bMI9ry37dobYYt0= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5117 Original-Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT057.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(346002)(396003)(136003)(39860400002)(376002)(46966005)(33430700001)(478600001)(55016002)(356005)(8676002)(9686003)(5660300002)(70206006)(336012)(47076004)(33440700001)(4326008)(82740400003)(186003)(54906003)(316002)(82310400002)(86362001)(36906005)(8936002)(81166007)(33656002)(110136005)(6506007)(53546011)(52536014)(7696005)(2906002)(26005)(70586007); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: bf160e8b-fe23-424b-8b2e-08d7f24fe6c9 X-Forefront-PRVS: 03965EFC76 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KJStfcxXyUIlhHeu9UGFlyxC481Dq+G7R6JUo2MMcpF8l8VxJOmRKyN8bglnTczoJZMQFnN7agHPGnbwBPgbbBE5MOMgsa4ka0o238OLH4SAkeF46V+vb/+HdInJu6wKnmfhKEDAxKRcTdmz2ZPOGU6jUf+BNofITQysiHBk/tGnIzLIn7XGNCa2KIU551sR1PQgNzxXsQP5P1drGuC1if63wn8VbKXLkjXUgi3GASaC16CtvGYHX4dv0aE50dVTi5LyjIMGqJZLLy19qnLQE+EGIdsuCE44fWPqnGhgZayuNkNuh8lc6kLZ8WBbxRbJJitwHOi0634pG54ds70YyRpLaUPgpyTIcNzaqALV8h74gcnXG+telu2NsF89+X1SwDVdlUXuZr33Uh5Tcdkdj8CY4e7tFnoW4MtN1PjytFcVv6l23Y25FzqCM6KM9TgqqU+gKwXwQ6NjX3yDGtTrLf6Eh0WUSyYaWs8vgcTJ5emC/ZSsaqNHUJ5pq9JiygibT1Y1JKpwGXH9xw8faanoT9HZKfLFF6BNcY00iq6pwvF7HTQKmouhVJieO8EYGur2EzVM7jciP36VHQj/imBrHw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2020 06:28:55.3857 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0a10b60b-6ade-42e2-6dcb-08d7f24feb00 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1618 Subject: Re: [dpdk-dev] [PATCH v2] 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" > -----Original Message----- > From: Harry van Haaren > Sent: Thursday, May 7, 2020 1:17 AM > To: dev@dpdk.org > Cc: david.marchand@redhat.com; Phil Yang ; > Honnappa Nagarahalli ; Harry van Haaren > > Subject: [PATCH v2] test/service: add perf test for service on app lcore >=20 > This commit adds a basic test to check the cycle cost > of related to calling into a service. >=20 > Signed-off-by: Harry van Haaren >=20 > --- >=20 > v2: > - Add space at start of output (Phil Yang) > - Fix compile error on older GCCs (David Marchand) >=20 > --- > app/test/test_service_cores.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.= c > index a922c7ddc..75a3f8b45 100644 > --- a/app/test/test_service_cores.c > +++ b/app/test/test_service_cores.c > @@ -789,8 +789,19 @@ service_app_lcore_poll_impl(const int mt_safe) > "MT Unsafe: App core1 didn't return - > EBUSY"); > } >=20 > - unregister_all(); > + /* Performance test: call in a loop, and measure tsc() */ > + uint32_t i; > + const uint32_t perf_iters =3D (1 << 12); > + uint64_t start =3D rte_rdtsc(); > + for (i =3D 0; i < perf_iters; i++) { > + int err =3D service_run_on_app_core_func(&id); > + TEST_ASSERT_EQUAL(0, err, "perf test: returned run failure"); > + } > + uint64_t end =3D rte_rdtsc(); > + printf("\t\tperf test for %s: %0.1f cycles per call\n", mt_safe ? This print will be printed before the function test result. Apologize for my previous comments. Please ignore it.=20 A nitpick comment on formatting the output. - printf("\t\tperf test for %s: %0.1f cycles per call\n", mt_safe ? + printf("Perf test for %-10s: %0.1f cycles per call\n", mt_safe ? Tested-by: Phil Yang Reviewed-by: Phil Yang Thanks, Phil > + "MT Safe" : "MT Unsafe", (end - start)/(float)perf_iters); >=20 > + unregister_all(); > return TEST_SUCCESS; > } >=20 > -- > 2.17.1