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 34EE6A046B for ; Wed, 26 Jun 2019 15:19:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 794FB1E25; Wed, 26 Jun 2019 15:19:27 +0200 (CEST) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30074.outbound.protection.outlook.com [40.107.3.74]) by dpdk.org (Postfix) with ESMTP id DF06D2AB for ; Wed, 26 Jun 2019 15:19:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=kIAyRep8COlUTX/TuCFGJd6bxnu2O6SgBRIUhocrRYnCJ+UJhTvyT7vMEwyykBhF41jtibr0uWwL8KK1fLmbzlpJhffN1FGTZQ/t5FkWgMl5VJqJJcE2xKP5ZBbwxW+rpnUf1S0qnmr7itlOcDer+uBQUiyIIuDsMKH4skSYab0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1IdROgYOGBGVZq16rwxJnN28ea9RZCBKG7e1NCO6PqI=; b=NebFug/AFpTIc+yptlX2iZiAZV+FYYuKuynyYim0Nmrx463UFOwolWjof/dFmf1HnW99wXAEOeNzTramj36iM0Un6RdD5gZFkOOXyx9D4AuGno836e1Zk1mKDZ2egC/iICzjAUqEsUH8OjgcTwA8cDLCZ4gKqhp7cwpg2AonQmU= ARC-Authentication-Results: i=1; test.office365.com 1;spf=none;dmarc=none;dkim=none;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1IdROgYOGBGVZq16rwxJnN28ea9RZCBKG7e1NCO6PqI=; b=D7oQI0g5aAYlvnF3WYqjlu48SQwy73ZDVS2/PvL6x1uxQrwIuybdbssW33/6lYgniD+C/F5EKKd1L7rPLz64HYNEajR96imVNbVYza9/uEHgzFNJGWnEKLr/ViMQoh/kXpR9hlIKfZpTtgdRu42FRYOKk9+y5TT2bidqG7SvlXs= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3314.eurprd05.prod.outlook.com (10.171.191.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Wed, 26 Jun 2019 13:19:24 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::1442:fc4d:41ad:29d2]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::1442:fc4d:41ad:29d2%5]) with mapi id 15.20.2008.014; Wed, 26 Jun 2019 13:19:24 +0000 From: Slava Ovsiienko To: Bruce Richardson CC: "dev@dpdk.org" , "bernard.iremonger@intel.com" , "ferruh.yigit@intel.com" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: add profiling for Rx/Tx burst routines Thread-Index: AQHVLB684bjTosGyukmH5WaeRSplKKat5gbw Date: Wed, 26 Jun 2019 13:19:24 +0000 Message-ID: References: <1561553317-16777-1-git-send-email-viacheslavo@mellanox.com> <20190626125732.GC862@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20190626125732.GC862@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=viacheslavo@mellanox.com; x-originating-ip: [95.67.35.250] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e2954071-2cca-4c3d-86d2-08d6fa38e84d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM4PR05MB3314; x-ms-traffictypediagnostic: AM4PR05MB3314: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 00808B16F3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(366004)(396003)(376002)(39860400002)(136003)(13464003)(189003)(199004)(86362001)(66556008)(76176011)(476003)(508600001)(6436002)(45080400002)(446003)(486006)(6306002)(6916009)(9686003)(8676002)(66476007)(186003)(55016002)(6246003)(102836004)(76116006)(66446008)(66066001)(11346002)(256004)(33656002)(4326008)(74316002)(64756008)(14444005)(305945005)(8936002)(71200400001)(229853002)(53546011)(66946007)(7736002)(81156014)(316002)(53936002)(6116002)(81166006)(71190400001)(14454004)(73956011)(68736007)(5660300002)(25786009)(6506007)(26005)(99286004)(52536014)(3846002)(7696005)(54906003)(2906002)(966005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3314; H:AM4PR05MB3265.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Nf5JxonQpspdzice2tY+xiwjUtlslaZypAt0Oz8MQOBoDco4VuUvs+5VR1RccGSgZ/jJsfmwpYLr1LYa4eSCHsfThRkhCiEoLKaw0Qh1BSp1g0mhOP3weJYpnmhfLUgz0nRW7WLQX6b9Fhq3DNknEq+oHb+71oZVb8S23ZHb6QDb185ysKyivAqz+Dvj9qxUCru2ONo91r1u+dtG8VFa1N5k0Tvz/ED9fRtRn9hf5zXyDkG4/KrxO2AmxEGPDk6s71eqmP78B0oBCzw/MjoQEgFJsIM6x8tyVYe/xw8BEG2gVDWNrnTRr0txS52E0kZG1LZjM21kjWrNtd75I40SpZ5lX3/5xXV+sEsXVEQhe1dx/QorotzMlUNKlwA0fFVzgWcXxBI6iXIe9iwMysDnlnapUqLPDjiIOc5H1F6WmA0= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2954071-2cca-4c3d-86d2-08d6fa38e84d X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jun 2019 13:19:24.1551 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: viacheslavo@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3314 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: add profiling for Rx/Tx burst routines 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" Hi, Bruce Do you mean using "if (core_rx_cycle_enabled) {...}" instead of #ifdef ? No, I did not try runtime control settings. Instead I compared performance with all RECORD_CORE_XX_CYCLES options enabl= ed/disabled builds and have seen the ~1-2% performance difference on my setups (mainly fwd txo= nly with retry). So, ticks measuring is not free. With best regards, Slava > -----Original Message----- > From: Bruce Richardson > Sent: Wednesday, June 26, 2019 15:58 > To: Slava Ovsiienko > Cc: dev@dpdk.org; bernard.iremonger@intel.com; ferruh.yigit@intel.com > Subject: Re: [dpdk-dev] [PATCH] app/testpmd: add profiling for Rx/Tx burs= t > routines >=20 > On Wed, Jun 26, 2019 at 12:48:37PM +0000, Viacheslav Ovsiienko wrote: > > There is the testpmd configuration option called > > RTE_TEST_PMD_RECORD_CORE_CYCLES, if this one is turned on the > testpmd > > application measures the CPU clocks spent within forwarding loop. This > > time is the sum of execution times of rte_eth_rx_burst(), > > rte_eth_tx_burst(), rte_delay_us(), > > rte_pktmbuf_free() and so on, depending on fwd mode set. > > > > While debugging and performance optimization of datapath burst > > routines tt would be useful to see the pure execution times of these > > ones. It is proposed to add separated profiling > > options: > > > > CONFIG_RTE_TEST_PMD_RECORD_CORE_TX_CYCLES > > enables gathering profiling data for transmit datapath, > > ticks spent within rte_eth_tx_burst() routine > > > > CONFIG_RTE_TEST_PMD_RECORD_CORE_RX_CYCLES > > enables gathering profiling data for receive datapath, > > ticks spent within rte_eth_rx_burst() routine > > > > Signed-off-by: Viacheslav Ovsiienko > > --- > > RFC: > > > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatch > > > es.dpdk.org%2Fpatch%2F53704%2F&data=3D02%7C01%7Cviacheslavo%4 > 0mellan > > > ox.com%7Cbe154ad6d7b3460006ed08d6fa35de9c%7Ca652971c7d2e4d9ba > 6a4d14925 > > > 6f461b%7C0%7C0%7C636971506606185633&sdata=3DY6UPuGwiYEeYrv3 > 9Sg3Wq9E2 > > GIBjyVa4mw31Et6FXKE%3D&reserved=3D0 > > --- >=20 > Out of interest, did you try making these runtime rather than build-time > options, and see if it makes any perf difference? Given the fact that we > would have just two predictable branches per burst of packets, I'd expect= the > impact to me pretty minimal, if measurable at all. >=20 > /Bruce