From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0051.outbound.protection.outlook.com [104.47.42.51]) by dpdk.org (Postfix) with ESMTP id 47EA02BFF for ; Wed, 1 Mar 2017 12:20:19 +0100 (CET) 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=aJPIaKdT665FSYK7i1mtkdylT92EdvHJtk8uRxJcjEA=; b=JrpxXmEUmK0w3p4RUb5lMB95cYArNB+jnNNk5zBzC46aSlDEYLdvqAjrYneaQ7HuxrpncNwuCmWawN7/qyyBfk0JrQPrNxiCeaJjI/4YuKnW+Vp6WG8aFQTtDd44LN9d3MuzNyrS3HBpXV8sTP9jgTnwJKg8yGw9MiLMKPgWotY= 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 (14.140.2.178) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Wed, 1 Mar 2017 11:20:14 +0000 Date: Wed, 1 Mar 2017 16:49:56 +0530 From: Jerin Jacob To: Olivier Matz Cc: Bruce Richardson , dev@dpdk.org Message-ID: <20170301111942.GA403@localhost.localdomain> References: <20170223172407.27664-2-bruce.richardson@intel.com> <20170228113511.GA28584@localhost.localdomain> <20170228115703.GA4656@bricha3-MOBL3.ger.corp.intel.com> <20170228120833.GA30817@localhost.localdomain> <20170228135226.GA9784@bricha3-MOBL3.ger.corp.intel.com> <20170228175423.GA23591@localhost.localdomain> <20170301094702.GA15176@bricha3-MOBL3.ger.corp.intel.com> <20170301111753.1223a01e@platinum> <20170301104257.GB25032@bricha3-MOBL3.ger.corp.intel.com> <20170301120633.6817036b@platinum> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170301120633.6817036b@platinum> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MAXPR01CA0018.INDPRD01.PROD.OUTLOOK.COM (10.164.147.25) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-Office365-Filtering-Correlation-Id: 41349918-8e72-48d0-28ff-08d46094f073 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 3:tUeWJR5+9pxvRWJ6NHPFf30QQw029NjxNS+F4MNQC41ivCfgSFZ02L+O+k5/WMzD5QaMMPctPGwo9NHa+lUA/iFU7A0WB1/+mn30hyYz036fxOJaqhzNE2lX4BzZVkWyWJPDD8S8ol7FDcJTeGi8iGStW9Hcn0VY4D8H+Fsex/n3TTY2YSCZ9hTwIQwNDcZ3DcA2/ymAQlaKgkV9Dq3KxkHhgnKFepbngmx/eHlCEIlT5LpemfRymp4yObam62qKstqGPuHwDJZQojeHhjVKKA==; 25:XflffIMXotoAUludtoQgWYim8DPHy4nrs0X22LrmlUNwnWDlcSTxHcf/Jnlw+G+Jrq8rQOd3c5a6Ai1SUiNlYQwHJjGw/Idy1mjHzXrpnI9g3mPx07CdmrVuHKQ/BGIEU4TaXSi8vCJarQtDwNMZ5TOqe/UeHcGabD5LZJAKoTzWyQAojbFAQ9gvRnksHXlsvuvO/Q3qXXdlTVwSCAqgfT5S4CC+EcAprX5NALvqkPHvfg4BrRo4gx0hRtsFQC0MiXwPYVsAsJRUiDq8LYXTdcRQgsB0Q/TQnRizl83MPmpAEJJwnRYaR0eHuoANAEbxQS0aPBwqFWWsMOaPVQToAVHSinYJaIuQoDkabgrUhKC1SlRCpFmLvh/KUlmirED3j7HMWca/HQlbiQCWwO33YLc8rY/3upTl8khFTh1reK3y4vGhWpbpOqZ5zmGzazRUpBrhdxOCMnfx6Hm6HhBGjg== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 31:W8AtzZtkImu0/o3KrWyfVjFivvuHmL8Mp7JWRgMRKHVJsnihK6V6DUu2+oVKGI5uZkc6xAMWVFWcpQmFDO+R5GfvEwcPMeklAKfO7u5NW1Cz41AMiyeNLJKCfzwuCvNfdYsF0K71hM8rhC2IM94VcronFAy4ltmFv4pThPGmCMIuZyNW7+bpVbDKdnD9fIKapYMNYfDVa7bTQyOUHbxf6mU9ft35xOHFTxgDD1LOkPZn2Sn2Jqz3EOcXB4+zIGL2ijq9zNLiWhf9bDmX7B43RQgzYf7dx+7v6Z5x2ECGUvQ=; 20:pkRZIfI6OYs4rUCoeASr8oucqk1IBXvdtLWv7qKDNoZ1Ev5j47e/zskeXVqOj9vaTlflaLTZbrIWTCA0YBB6+Dv+6O6Qix+BLZPQCa83rzi/9C1mNaQpS/jVRV+JMOOa2N1nhyjiN2fqskHIBNBBjmRqSyGU4n3me64/o7+vAGga53wSN3yLGax8QYCRDgAq/h9+ZY+7qsh+zEXbrCOphMlZkUtWc2pVU7sPiBHQo7a66I+5U5z89PE/hCfHmUT4MLOVnWRsOEyCKLYVVBJV2GzsiIfbeHu9RvCAPrvYueoMvSKfoTzDT+/T7S4Z97FL5TIvI+T+A/yDjTDevvDzM6TzJb3NqGiZF0CKd7ae5Vsz+4kSRDgliHjB7D9P10eNHWW4IIuL6+WH7cE8F+Hb1aA0mUjGZEu6A9/msKoJoGW6wNjiw4HtsxuMLRGQ88icwP/vuHnaenJnnorBZ2hXu5hayoQJQbC8F665GD5p86/ofapYPzXPGJKpqMXm/MEZfQnfatui/LauMe5xOewnABJaTC/8gpJtIAscyYyhqmKBqiWxIjmq6y887MVotixYyJaddx/iNTkfo1XlNLt278UhoBNaCG8vZ5Th5ygy6IU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123558025)(20161123564025)(20161123555025)(20161123560025)(20161123562025)(6072148); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 4:lTRrhGye6E2Y7mjpJHpFYHiqzH53+VIvjfAsJUTlz7QGZ+x7v8syODB8ENtc8V3A08ZTs5gf9hipafl9LS9acVM0EQV9/2Osvq1Hpox2PZQfdSbz7Ew9Kg+Axu0iNLhPx2DVs7rQhYSlpjLiD8/msEaSqWvMQA9IcqAJewyBrDJsX/hrNxSQBG4JzE8y/+3J24k/jWdi4Zrk479o085Ksc/XQxDAUEtcYZhKzHOFRy8M7lZZNZtxs7061uhYjmWxZBay9OrOxiMMr43Tbug3q+9KAbK5rJtF6/zPSRjwl98JwpQ7EuYXVMF3W42O5ZPNVG7A36+YvOn90Qgqze9xY004Pu0dCAEqfnZ0hB459olUxQ4NKZcRXFclTKMKOj8zffktCdX6ksSurv5OFOi5KG3RT7nqEdrWV2u60+w1rKkYqM8jUZuoNWOJ2u6cjXnJw3DRoiF5ma5lukg0v4VIBmqizuJd8RmQl+OSSM03uftmtgDi1sCccI4ONiFUzZz/Sz93jU8cwt6X4bPMoI4Y/zdtFXTomhjzBMPgtbCJPbeTDYjg9ouWDpwuoVh/fZZNtMCcm6mYcz1iszGGyq2QVOHcfcGprZkB0vkgQt8j094BCRZql41NMrJ0akErRLel+ZZT0rWYK++Z1ySdkfTyHA== X-Forefront-PRVS: 0233768B38 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(24454002)(66066001)(47776003)(7736002)(6116002)(83506001)(305945005)(61506002)(55016002)(3846002)(25786008)(23726003)(5009440100003)(9686003)(4326008)(38730400002)(110136004)(6506006)(1076002)(92566002)(4001350100001)(6246003)(33656002)(2906002)(54356999)(53936002)(50986999)(229853002)(8676002)(81166006)(76176999)(189998001)(50466002)(5660300001)(2950100002)(42186005)(42882006)(93886004)(6916009)(6666003)(7099028)(110426004)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:localhost.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:2qU5BByO5ekc1XjEQ+L2RzQnKDpr72Y5BoKWKyr?= =?us-ascii?Q?vLjBRw6sP70D8wp+GxuOcz7EZKmMUEW5n46KRHNuntjtocBaQr1a21MV+ecp?= =?us-ascii?Q?alENlMlBO+xN/1TeHrpusJj3HCZCRECV/Jb+w7xACgCpDXaUI2x361j/z0F0?= =?us-ascii?Q?M5OVU5d50+Qjbp69K8GLTJTIb+z/bQ6U3ekbR11EjJ9cn/+N5o4NOZpT9f2G?= =?us-ascii?Q?8xg6g8nFqYIM1sBg3HkmeSU32U5SGpDDKuXEiPJN12yycJg3LpsbQkge5Lkn?= =?us-ascii?Q?zzdz/e/g958RCljTgZoxDIgquB5KMNO3gWu1IgkeAT/f+xX/cHwiTnm5Jvhu?= =?us-ascii?Q?f8yeeGpaNrGZnahVfEG0us6IeB3oskTGD143G7Mpce5NCpesz5CibCAImheB?= =?us-ascii?Q?OynEgF5t5yacCTRzm8jg2CCBUO76ZMhj/7JcY6PFS8UeDVayuG9mSOyMGxlw?= =?us-ascii?Q?t60GSnk8NY4rRT+QpWnv1QK0cXtSe/bfxMz+LkPwbNGDDluA3qrseJ9SU+qC?= =?us-ascii?Q?p1+nOpKxiBfYzLgR9vrVkS+JBu4OG9zQ623VXMSJl5s5BWVJYF5Lm3QSuzwg?= =?us-ascii?Q?Wo0W1v/w8g0o5gZjWTGgRxb+acMoTi1Y6rvBWSkw/obwWFjMKjMfBxfus2Vs?= =?us-ascii?Q?sNb3AJoJfQ5GWNuqZlXJg95RAoa7l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QKD3t9OH85BVfDXrKcU8dsUaEGWgHT4g==; 5:+Bm7jjuzX8LSU6L7cawD4Zsb6kz6MdLnYqSA0yGhxjRfXiGQEqXqsILio3G0EcDg8u4Bp4+jrgho306OCLTY8KuBLLaHx8ZH5Kb6vQ15qAcRxzxom67lIcC8UOzUTwGuWGjfnyV2RGNswhmi7UOQdA==; 24:ZpSsj1GJBgQ/YAAer+SKdJuoMdEUWJCl2+sl4D3pGL8+x7RqSy6/i9aUoTRnbBCJfL5UffAeB4b0jfANsoV/9BQNU527oOL+trFa2c9RDYo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 7:aCu5UdEutEyy/RF3wMTwKi818npDeRXXcOfFh9PjYRPgF03J0VR1rdLbVjmoxkNDY+wFFYTXYkCbq/+aJs61e74sE46rOHXet9v1Lp570lxfEdc4v1GWrJle3Z75GflsUoBn7/IsQ3fqwh+92cEGAf96BG+rGRykrvyRvull9orRKEKb5egWy1N4r2l+3yHHR7X2ehvek+mAbkH53KhvkPsZVp5dM0vwjbwijMgLPhSl6ydbC6lJENacHzI3FfOHej8qcHzbXnQJusFL94+NGo7rF/gA2ZAPUT0zS3OfV+sHXMmOHH/PK2FBb6l4pZwDK30Tb6tguFvdJupo/82DlQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2017 11:20:14.8618 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: Re: [dpdk-dev] [PATCH v1 01/14] ring: remove split cacheline build setting 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: Wed, 01 Mar 2017 11:20:19 -0000 On Wed, Mar 01, 2017 at 12:06:33PM +0100, Olivier Matz wrote: > On Wed, 1 Mar 2017 10:42:58 +0000, Bruce Richardson wrote: > > On Wed, Mar 01, 2017 at 11:17:53AM +0100, Olivier Matz wrote: > > > On Wed, 1 Mar 2017 09:47:03 +0000, Bruce Richardson > > > wrote: > > > > So given that there is not much difference here, is the MIN_SIZE i.e. > > > > forced 64B, your preference, rather than actual cacheline-size? > > > > [...] > > > > > I don't quite like this macro CACHE_LINE_MIN_SIZE. For me, it does not > > > mean anything. The reasons for aligning on a cache line size are > > > straightforward, but when should we need to align on the minimum > > > cache line size supported by dpdk? For instance, in mbuf structure, > > > aligning on 64 would make more sense to me. > > > > > > So, I would prefer using (RTE_CACHE_LINE_SIZE * 2) here. If we don't > > > want it on some architectures, or if this optimization is only for Intel > > > (or all archs that need this optim), I think we could have something > > > like: > > > > > > /* bla bla */ > > > #ifdef INTEL > > > #define __rte_ring_aligned __rte_aligned(RTE_CACHE_LINE_SIZE * 2) > > > #else > > > #define __rte_ring_aligned __rte_aligned(RTE_CACHE_LINE_SIZE) > > > #endif > > > > > I would agree that CACHE_LINE_MIN_SIZE probably doesn't make any sense > > here, but I'm happy to put in any suitable scheme that others are happy > > with. The options are: > > > > * Keep as-is: > > adv: simplest option, disadv: wastes 128B * 2 on some platforms > > * Change to MIN_SIZE: > > adv: no ifdefs, disadv: doesn't make much sense logically here > > * Use ifdefs: > > adv: each platform gets what's best for it, disadv: untidy code, may > > be harder to maintain > > * Use hard-coded 128: > > adv: short and simple, disadv: misses any logical reason why 128 is > > used, i.e. magic number > > > > I'm ok with any option above. > > I'd vote for "Keep as-is" or "Use ifdefs". I'd vote for "Use ifdefs", default configuration can be "RTE_CACHE_LINE_SIZE * 2" but a target can override if required. > > Olivier