From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0095.outbound.protection.outlook.com [207.46.100.95]) by dpdk.org (Postfix) with ESMTP id 5B49737AC for ; Tue, 24 May 2016 17:17:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vZLxKAP2N78Fi38Y40dydqzJVBTcTVbgZ/Y4xt2I/Gs=; b=oRp5GakIR9G9myExX6ahwBbC9Uqu+/+M+ru5LXUVWwqS2gujyS4U7a7hi/lt7SZBHYLSJUHfJCITC5FasFNKDWa9CHaWII7C8Q+dDWcubQ+SzsQJxRWUBa6tvZhttdmnNyKPeopfIsl/sfzIVHrrYfZNB5xrg8XU5pZv4uMqjLY= Authentication-Results: 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (111.93.218.67) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (TLS) id 15.1.497.12; Tue, 24 May 2016 15:17:24 +0000 Date: Tue, 24 May 2016 20:47:01 +0530 From: Jerin Jacob To: Olivier Matz CC: , , , Message-ID: <20160524151654.GA10870@localhost.localdomain> References: <1464101442-10501-1-git-send-email-jerin.jacob@caviumnetworks.com> <57446C63.4040605@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <57446C63.4040605@6wind.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0031.INDPRD01.PROD.OUTLOOK.COM (10.163.198.166) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: 8b654ec1-81a3-4c1b-c939-08d383e68394 X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 2:urdpAfLqnOdnzlzGggSaaOa9v3maK0RaedGGwpvF+0quuskhjT1XN+YaBzeSkv5I0GY7uLCVeZuWe0Ha+G+HnrAFUDr5jCKPq7G4m3mJ1XV7hbmywFLEYbQzc5Pv/CRKT3mugfHCDoHcuwMxWqjQPeIvGV6gmh52h9jgPmLJD24p48ZybOafzmbc/AksJtMo; 3:j0IJBbRWZFFX8B5MrQJQ51iY4MfWeK7Ihg6B0qSvV2UvTHNJ6d37vfoU1a+27Rv4VPsZFMB663CfUZh5gj66vFTJTzM0RyralgzLokEi/bc8t2kHyQtMXeaoHL4TqON6; 25:ApJwqGWr0q9vRfjhQowtdXlttegkSfevIiiJ/9d93QF0A6ppojciVXNqcImcgJF/Pf/nZrUIZokWr61ORFhiXIARDY+8GupJg3PxPNBNLsOn/sgKV5pQoLkBtcW3wP2LH9O4WGIOkwjrLvcdRRHfL0lTyyvm8vmCXLRxuRiKck1rZMcr3mTMknfqunl5hkrWuNnxMs3vcyAdBJGYJgMJKIUsAzQI51XKrUu3QpyDK98YKXdLJcB7hqBr0s1ol8qIrC816eAlKhFun36Kp8xC1ToHPuqeb8tD5KJ+deoXmaN8ZrMh+bdiVxFByQxMe1+s/FIPsIcFhW7pItX9YsxIHQF81W8hYacZfTMcUc3lBB9IQMyrTneAEdFV4U2UOkpr1kpZcXwU1AAeA/OrHKCuefYszKEGexDFslKG5oHe5Bw= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 20:FmZVOsnNGygwfBG4mELamAVhPQ3NRQfHtma/5d8z/6tpxL3Kr+2xmfD8CXVDZrH9f4Ol4VDtWay1t/19sltdy48BlLiZdU+mC4HXs79iWgndLac2lB69hswvH0/lq8CT7dB8vQelsLOiNlt3o81O0s33Ts1C75CwEa+GgdVk26oqC/ZZ/2DDtOQD/kr39ONXkHta2Xo13Xvteiwjttq9qCEbWuh3dJhoG887z3LZKXZAgEac6Z/l4rhNYgm/L58w5dQSoa6by3QBNN/Xa7V68xnsrAyKMX6SkGy0ub2ueEE9DryJMYjA5V/7y+avDepQpcRNsCg6Vu0IzqZZbCS836SlJwIvmdwCR9fIMUKRHd7JTzY61sFJR+G4mTqUpQdMR8Awi8hptbcRaHpNlW3uru2VCsK7AK9pxDhLyCdQbSPOLny0JTbXfNCoINKOrXRT3UiFE7zxa5o+VufeB0PgNQg0ETpLTvnj2pVdtN1WXrWOh8fsVWxxQxY5oyH2aeouq0iCWachdPVCmgiYqhpmvL6lnZCNvWXjiEvD4yOID8jbaWmBGX2ZTl9YI2markXbG3HxR0KahZN0Wy9XkLb+M0n6T6ymkQCNGZBJBBGmvpg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:Hx9qL24iWdVXKco+0d9ByGuCVZD+aplCcCumMC1seS8kAbY/rTFmsKrjUOxMO6kT2wKbbMb4hdW0VBZOajkVj55U3XCldmRYN33NAm+7CD4v8aVok8zBTXGluUur6csHY6nmKHVXv/teIDn+FFN2NO4ryxb4Jut5yYl9Hs605asi70g3zUerWwh+lanouH8jahsNJsS3sTuIAlLtVoLXJEi3/Cx5vPVnf7dtnnbFK9sd6LiWj/qtK1xmDEb7ewjRnmRVdnZWouTxIB5xtoKe637LGoUbXzV/HvCIwYIUaarK/uKiWhrP7QhpgJ78U1FJ1DZwrFme4i7DRIu9zXtPIRKzoY232wSjacAJpThHaqLjAi71DRf7T3g2xcOLoKhP X-Forefront-PRVS: 09525C61DB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6069001)(6009001)(24454002)(377454003)(42186005)(110136002)(189998001)(4326007)(2906002)(66066001)(5008740100001)(50466002)(19580405001)(19580395003)(9686002)(33656002)(46406003)(5009440100003)(83506001)(1076002)(54356999)(23726003)(50986999)(92566002)(3846002)(6116002)(586003)(8676002)(77096005)(97756001)(81166006)(4001350100001)(47776003)(76176999)(5004730100002)(2950100001)(61506002)(7099028)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:tR2nWzC+sorBeVSDysMr4qbjmCZcDFDqXAIIfmF?= =?us-ascii?Q?FlmGPfrRKBY/Gt2UrPuP0zm4CgnHdNewrx1AdHUfdY3BmT9FvfU27On2ghE2?= =?us-ascii?Q?p3moiWDb1mjilIW8mAgDREXpoCmteWscM0pS1/bewLsp9E+J0mZ3uIWOyq1K?= =?us-ascii?Q?0MTsER/4AByCk1fDFru2vqvBFAe4vYJcqnN2u+DDR4ClWHI7m+oMPqCnKdbW?= =?us-ascii?Q?kso5JZcVUVZWB/nyAY+6e/ffRLByYob2xyzj8Wsx1nHHT/9RSBjRV+TNz1ux?= =?us-ascii?Q?//7tkiYqidNvPD6G+BFgfQrium56DIbJ50MVDpuCKPgMaH4Zwuk6Fw7e+w9+?= =?us-ascii?Q?nQzXOo7aKEeIkVpLI0Sm7ZfE9LBJU1krFf8buLM1Kd+ZXjscVqddJF/5igrg?= =?us-ascii?Q?YMv3rFlN/K+AM18ZNCk8exe8poomw/j4g+chlAeBYpEhyPGR/+yHxi2DFUXq?= =?us-ascii?Q?XunQZu6WlDS5EzwYJq8/FuMK9PetBIINGVspMpM/mhu/tUJ7J67hmufGMjry?= =?us-ascii?Q?AmKW9uBiMelZkcL96UPTFz2hhskl2FkPCmdt+kxTH5g70r6KC2dmnqYK2sQb?= =?us-ascii?Q?7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jymYL7eoGHv9bjXDsliCzEe0El/ERBdLIleqWA9MZ2r4RnN4Qw77AF9lnV86tEUZMEEZi4HI69Z0o2tIZxC/bw160DKMIJ0DERB6oPwUVHXX4iPEq7Qx5 SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 15:17:24.1560 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: Re: [dpdk-dev] [PATCH] mbuf: replace c memcpy code semantics with optimized rte_memcpy X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2016 15:17:29 -0000 On Tue, May 24, 2016 at 04:59:47PM +0200, Olivier Matz wrote: > Hi Jerin, > > > On 05/24/2016 04:50 PM, Jerin Jacob wrote: > > Signed-off-by: Jerin Jacob > > --- > > lib/librte_mempool/rte_mempool.h | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h > > index ed2c110..ebe399a 100644 > > --- a/lib/librte_mempool/rte_mempool.h > > +++ b/lib/librte_mempool/rte_mempool.h > > @@ -74,6 +74,7 @@ > > #include > > #include > > #include > > +#include > > > > #ifdef __cplusplus > > extern "C" { > > @@ -917,7 +918,6 @@ __mempool_put_bulk(struct rte_mempool *mp, void * const *obj_table, > > unsigned n, __rte_unused int is_mp) > > { > > struct rte_mempool_cache *cache; > > - uint32_t index; > > void **cache_objs; > > unsigned lcore_id = rte_lcore_id(); > > uint32_t cache_size = mp->cache_size; > > @@ -946,8 +946,7 @@ __mempool_put_bulk(struct rte_mempool *mp, void * const *obj_table, > > */ > > > > /* Add elements back into the cache */ > > - for (index = 0; index < n; ++index, obj_table++) > > - cache_objs[index] = *obj_table; > > + rte_memcpy(&cache_objs[0], obj_table, sizeof(void *) * n); > > > > cache->len += n; > > > > > > The commit title should be "mempool" instead of "mbuf". I will fix it. > Are you seeing some performance improvement by using rte_memcpy()? Yes, In some case, In default case, It was replaced with memcpy by the compiler itself(gcc 5.3). But when I tried external mempool manager patch and then performance dropped almost 800Kpps. Debugging further it turns out that external mempool managers unrelated change was knocking out the memcpy. explicit rte_memcpy brought back 500Kpps. Remaing 300Kpps drop is still unknown(In my test setup, packets are in the local cache, so it must be something do with __mempool_put_bulk text alignment change or similar. Anyone else observed performance drop with external poolmanager? Jerin > > Regards > Olivier