From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0088.outbound.protection.outlook.com [104.47.36.88]) by dpdk.org (Postfix) with ESMTP id 3B13416E for ; Mon, 12 Jun 2017 05:07:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=cqlsXR51qaKa+JYevsXt9jwVsMtDq1wY9g+gMdUWEEI=; b=FW5o8Qwh2SJ55ajyfGXPUtzCIki0djwNXTqc9YGEGMpoDvgHqrsu6OXB0qCeEFsIay04Obe6nbtlREO5Hee+XYZhgr6xWTHHnMbL2qq/YormVBEYO075i4DgJNUC9SMkm/yDi4LYAwNYp3G1xXpmv4X5N9jbOkwVD/sH1UUiMvQ= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin (111.93.218.67) by BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Mon, 12 Jun 2017 03:07:49 +0000 Date: Mon, 12 Jun 2017 08:37:32 +0530 From: Jerin Jacob To: "Ananyev, Konstantin" Cc: Stephen Hemminger , Yerden Zhumabekov , "Richardson, Bruce" , "Verkamp, Daniel" , "dev@dpdk.org" Message-ID: <20170612030730.GA6870@jerin> References: <2601191342CEEE43887BDE71AB9772583FB05216@IRSMSX109.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772583FB060FD@IRSMSX109.ger.corp.intel.com> <20170606124201.GA43772@bricha3-MOBL3.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772583FB0644D@IRSMSX109.ger.corp.intel.com> <6908e71a-c849-83d3-e86d-745acf9f9491@sts.kz> <20170609101625.09075858@xeon-e3> <20170609172854.GA2828@jerin> <2601191342CEEE43887BDE71AB9772583FB07AEC@IRSMSX109.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB9772583FB07AEC@IRSMSX109.ger.corp.intel.com> User-Agent: Mutt/1.8.3 (2017-05-23) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0030.INDPRD01.PROD.OUTLOOK.COM (10.174.214.16) To BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PR0701MB1718: X-MS-Office365-Filtering-Correlation-Id: 313ed3bc-abc8-4566-5473-08d4b14036e9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 3:jJxvstSdHB7e5DqN8DFOpdSZp4Tk4L9hNYmHXPixNv+R1QIys/E6NQU3Iqthr7HC3QiMeIINQ9G02YX/GFtzSOJ55T6+SgrqJ0Yc5foWMQ5wTBNe32NdhIVdLf9fKvmA3hPw6wVxxL0IOkydO6LrfsAMvvazGNeIyCX10gCxXIDsTzlFut/wgSbdrZq6reln5c0oduEwVrJDj2LDonSrnOdM16rb/e8kXgbj2BlRdJLxn8g6c5UCQmYE4RZJBW7c3WUdTvAa9adQasK99tTZSJ1BnPLpJ/CioWFkS9egDY77gBFQgfS+I1nf2GUpsDjzt3Hl8RSuBp2emHPm9XPlbQ==; 25:64xVDA7BPSd1k/2nHMrdi2R1V0zjMn77jkvsMMjfErA1nDujXe7/c0Yu3Egi36vJFEBGNCItNdQQygIT9tPyP6GZP6dQ4pvUJR112NCn/zMeacag12CIGYF0wIKFvrWubKAwBhg8JlNgHSzqz5lO337bWddWSXLH0nssRoRorQ8LQRvt7UVtapF4vRrFoc+3JC1xqgmBwPHzdZIEC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UyfUa0YxOnPXn/sUtQ1otz4hT3bnBXSOwAR03SQ3jjrgi/bYCU7o3zz3/S6Jy9ljnnWDtvdPZgbS2UzgqRjaIJU2YQcuNY4nMQEK4ysnp8Z7EGG/lHYP8bRIJhDuud8gVD73msW2zEg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123558100)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR0701MB1718; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1718; 4:aioneJ6H8PQp774cuqZ9JGpQtT9RxcE+PW+M0zIJ?= =?us-ascii?Q?vJ9EMaD9rhW7FFoKe7QM8rECUpS2T83HJhVQpkvscrvmNAm08/t+QvTnWOh9?= =?us-ascii?Q?UZUATEciYMf4awmiFQTuV8+Np2cE4oGKuNwX8lVAc51ZUa3fpEkjsF+CSXq9?= =?us-ascii?Q?2aqYOcb5mNgP2jktKMBjHG+aWzGmRLOhSQGOyP9QTDUsFjni/5mido8SMAAe?= =?us-ascii?Q?06BYKpZGLFn3/H8TWNc6DW+F1xD3CrGnA2omwTyDUvpDvwILdim3kidx7XLj?= =?us-ascii?Q?pI6mdTagjcIsE72V/cN/CQWDIVNgdf8WXi3vg54Hd2N1wVMQKWBIZwzeP4N/?= =?us-ascii?Q?MhISj2tBbCiuIkfT8guG9Ot0KBVPEdUIaVsTfF669ghL6W+sza7FdwPAwa6X?= =?us-ascii?Q?6Xf1alPb945RFqp5Xi60mjNsaKAmvZ/NPcVQo0tcZ4YquUKmEH5h+AdI3Ciz?= =?us-ascii?Q?7KkfluNlKgMLhUraLAB6EY8zoAdVbQTMJWBrAMpFufa1rT7DXZ6U2KTQk3bK?= =?us-ascii?Q?LnqjycQVN1LmcOmWESLh+nafJ+yEGkK0yKSmy+uUUTkK4IBulI4d9n/aQXpI?= =?us-ascii?Q?PFozlrfB1uhPFheNGdeXAt3jDuFd6U5+M0lHW6SAcOKvXomjhxxQPb08ZWVG?= =?us-ascii?Q?r8sz0ChUJZyiI8qWuXJvZ83TA2l3U36///9ogp4UX0Jv/3l6PkuU34PX7m3W?= =?us-ascii?Q?dweX0pbX02zkRh0ipz2ligSpFBIx8HYOWgdiuIUeiA1nuzTB114ZAJJjayiV?= =?us-ascii?Q?dCPNJfbamQTgNd/FVTaNTkuFdPNENxJz37YBR6jJWAO+paH61FyjqskHjCQx?= =?us-ascii?Q?ZmeSkzz6SV1jAa6sXbClQy/vKo6335jpuq2d7P6gOM9tmpZpqkBw1KhXurs1?= =?us-ascii?Q?GRzq6ORtg5fcaVKmHzMZbwPIAJ+uLczc97RtGRbtPtqczB+37UzNNzSf7MuD?= =?us-ascii?Q?NJtWIADGUDMckb04j7zFOTzNxATuDANp08V30HfaBp6acRCnGDVvFFnMSOCN?= =?us-ascii?Q?MU9M1hj1JffC3k3fyqsnKUK+2N73wm3VbAtkxAV5YUeB6fH8rFkanTLPUHSC?= =?us-ascii?Q?030/EZxRliFGqBKEmBVZZV0veWgj+hFeduabLf01AFBlNm+Zri+gY9Gmj7Ny?= =?us-ascii?Q?EU8DamxU+EVBJBJO4ewTl04gmRZeYmDO6G+ItS2yNT1m6qXys7QTIg=3D=3D?= X-Forefront-PRVS: 03361FCC43 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39410400002)(39450400003)(39400400002)(39840400002)(377454003)(13464003)(24454002)(53936002)(2906002)(23726003)(5009440100003)(93886004)(53546009)(53376002)(1076002)(3846002)(81166006)(6916009)(478600001)(42186005)(2950100002)(42882006)(8676002)(6246003)(33716001)(6666003)(54906002)(7736002)(305945005)(54356999)(25786009)(50986999)(76176999)(966005)(33656002)(72206003)(9686003)(6306002)(4326008)(189998001)(110136004)(38730400002)(6496005)(229853002)(5660300001)(47776003)(55016002)(66066001)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1718; H:jerin; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1718; 23:NkJ3PChutxttgVvxdQ4wu4/5X5pG63RKX+ATyCb?= =?us-ascii?Q?twIuQwsNBRZW29psWEpQPk9tbtC16/E8l10HCmodHyk2jbkfX3BL+g7NCWM9?= =?us-ascii?Q?QIepPeK0Z0MI90VeEglD/PD4OmCIx1RR+DyaXMAktj1WLGotMhx6gLrsuyKw?= =?us-ascii?Q?v/gGM6Exg9Fhba1KGyqBCuMR+ix+VdU8/M8gaUyfflMhKsIYhqsZtCAJU4a2?= =?us-ascii?Q?Z5dsVr2vBjOmSTdMPOugx9Ixc3pLud2LlSfKfIKIi5tBg9m/n+He8CAcZoXW?= =?us-ascii?Q?UesuNMQkSFS3tvpJqVknUom91KBK57OwRyZExCCBqxbeTr2w3lcQsm8X/M1A?= =?us-ascii?Q?gaFdSREImd2JOp5TK3ehT+6ZJvFH1sjQBTIgA/PioqkWJ3j++wN8Yk3A61AZ?= =?us-ascii?Q?GkHm7z4TcWveQuJ5G3wuiT0XF80KxznGi4V5pmTP5I0Q1BPdQ/NYAFR65V7Z?= =?us-ascii?Q?MZaCttE1PuwQeQP4jok6MK+UP9HsrFQCbOM3dNY6aa3L5xB9IJX98G2JM8r0?= =?us-ascii?Q?6zszmBq6i2Xlg5KmmIDPwsUakMBtPiTtX3K7OtrP2lIxDE7FeHCkhrSE9uRq?= =?us-ascii?Q?MK3cAxIUua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ZXk5vyARIwJ3UBeFMC1+onfQcw7K+zRfZtTqf72UUufKMG1hTdniSHBdcYPLy5tQHOvDbw2ykQtb1Mvluy8FpjASu4fNL3k39cuvfjmD8WDKY94JBejMQrD3M1y+4jBk8aZFaUvJxSUKblz44cRvuo0DMUUoQXJjKSKDROrqeIY0WKfU7WPvigLCWGsmHU0xJ+Ar4tnFNxdhynrw5uMTSSMDtwoUZsmc0eI6uNyajD40X3pZaZDLyqHmbRNYyLWRWeTzlSWZ6t2QnTacix3X7ibZuuD6Wn4zdknrOUaGv3S1EAzXZyucjKvYihMmOQeBJuKXIW8w== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 5:EvSN3+KRudb8wU6LqNc+YrNOwi0AAI4a4/9AQoaCPEMofjAL+Xm5jugEIt3fpo7JbwAQYl0xmtPp8pHI8CjFiMWpxV9hKBQ0ndXWeg60EcwoTfyRurCF5LpKvhL7SbanUyKs0qfnMshGFatHQVAnArYtNq6buEdnRqWcsDnOfQp+vAiAHFSyslEYeSnj9VN11OeJqFdc/u4dOZeWtuA9MXbYonYJPMcj/pfp1TzwOuIAsNI3jXkAEmog3LnEgm177ZeX/PkIZnp09Yd1s8tn2nooIxf/Urp7bYMM3I6aKQzRoSSNVeqZMBy7FTFoL0jlrZtrwbT8hd3PEzG532wxEH8lnWyfMiEanfELg666V45d/hKzupRh6UtiI7h1gTAEHbv68RkUBhXaxN0124bS7Gwpq09FklfoneozAm99GKNkqQf7JtfEI1tox+QQKTWkhssYSL2FnNCmxaoy0on9C4x16m7c2jGI79tC3yIh7mjSHL7CtbiyI2hnlhtwi9Gp; 24:9yRsFtpGz0Cc6Gx22pEV9QBECo2lPQm2eRa8Hf+BpklPobOKx8IF2sHAAoZvRcH7XTN5QeV0QtgjWYTwvEIGDf+ouQ2sEhbU8HXErSeSxng= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 7:KXPajRyBN/qrIdFq2AAf7AyxlYNem1UL1o2xfc7mCv8wXvMJm8Cv/98aq9B1dZKN9f/88UBBs2gzVs3owtzaJm+Z+w2Ov+LPDiufngWobvWlxpNgoNUYUnVDYnkwC41zy7mVHqA2g8NSr9eEw64xNy8aGwtQ2RHXk/qs4P8EyzaoWI+U+0lFLmZ2LXXAo3jgaGTBKjLvcJlED/Yf/JCxjqCMMvu9X47WYsfs7xdmXQW0wiMuqJVb73I5HLJhXYocfH40Gkn1IlnpgtlcKAwK2xSyH1d9u+aqymTGL4kMvgi2OfjDAk22ueBczr7xuCvjF5leNMu6JfF5JTJ3zBFgcw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2017 03:07:49.8209 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1718 Subject: Re: [dpdk-dev] [PATCH v2] ring: use aligned memzone allocation 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: , X-List-Received-Date: Mon, 12 Jun 2017 03:07:58 -0000 -----Original Message----- > Date: Sat, 10 Jun 2017 08:16:44 +0000 > From: "Ananyev, Konstantin" > To: Jerin Jacob , Stephen Hemminger > > CC: Yerden Zhumabekov , "Richardson, Bruce" > , "Verkamp, Daniel" > , "dev@dpdk.org" > Subject: RE: [dpdk-dev] [PATCH v2] ring: use aligned memzone allocation > > > > > -----Original Message----- > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > Sent: Friday, June 9, 2017 6:29 PM > > To: Stephen Hemminger > > Cc: Yerden Zhumabekov ; Ananyev, Konstantin ; Richardson, Bruce > > ; Verkamp, Daniel ; dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v2] ring: use aligned memzone allocation > > > > -----Original Message----- > > > Date: Fri, 9 Jun 2017 10:16:25 -0700 > > > From: Stephen Hemminger > > > To: Yerden Zhumabekov > > > Cc: "Ananyev, Konstantin" , "Richardson, > > > Bruce" , "Verkamp, Daniel" > > > , "dev@dpdk.org" > > > Subject: Re: [dpdk-dev] [PATCH v2] ring: use aligned memzone allocation > > > > > > On Fri, 9 Jun 2017 18:47:43 +0600 > > > Yerden Zhumabekov wrote: > > > > > > > On 06.06.2017 19:19, Ananyev, Konstantin wrote: > > > > > > > > > >>>> Maybe there is some deeper reason for the >= 128-byte alignment logic in rte_ring.h? > > > > >>> Might be, would be good to hear opinion the author of that change. > > > > >> It gives improved performance for core-2-core transfer. > > > > > You mean empty cache-line(s) after prod/cons, correct? > > > > > That's ok but why we can't keep them and whole rte_ring aligned on cache-line boundaries? > > > > > Something like that: > > > > > struct rte_ring { > > > > > ... > > > > > struct rte_ring_headtail prod __rte_cache_aligned; > > > > > EMPTY_CACHE_LINE __rte_cache_aligned; > > > > > struct rte_ring_headtail cons __rte_cache_aligned; > > > > > EMPTY_CACHE_LINE __rte_cache_aligned; > > > > > }; > > > > > > > > > > Konstantin > > > > > > > > > > > > > I'm curious, can anyone explain, how does it actually affect > > > > performance? Maybe we can utilize it application code? > > > > > > I think it is because on Intel CPU's the CPU will speculatively fetch adjacent cache lines. > > > If these cache lines change, then it will create false sharing. > > > > I see. I think, In such cases it is better to abstract as conditional > > compilation. The above logic has worst case cache memory > > requirement if CPU is 128B CL and no speculative prefetch. > > I think this is already done for rte_ring.h: > http://dpdk.org/browse/dpdk/tree/lib/librte_ring/rte_ring.h#n119 Yes. The suggestion was in the context of when introducing the EMPTY_CACHE_LINE scheme, it should be a function of ARCH has speculative next cache-line prefetch or not? > > Konstantin > > >