From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0077.outbound.protection.outlook.com [104.47.36.77]) by dpdk.org (Postfix) with ESMTP id ABFA858CF for ; Thu, 5 Jan 2017 08:23:12 +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=SkGtKpmG8PmiJuXMTNcQvK0eDSLBoPLerRKRyb0mbI0=; b=QauEkMKJISk3cxPqtpPlTkeWJ1HzWRTt+rUVVZjERVSUPTub8tBR3QCedA4xqK52RsZEiI2GKJh5JPerl5dDVw9yum9LyWj+44mNBeGk2e0BC8GD+p4SyuEDcBw6tT/wi0ceIojVlOjkI9FRQsq56gGHlriQhEM1tSYxDkR9b1I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (111.93.218.67) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Thu, 5 Jan 2017 07:23:07 +0000 Date: Thu, 5 Jan 2017 12:52:46 +0530 From: Jerin Jacob To: Jianbo Liu CC: , "Ananyev, Konstantin" , Thomas Monjalon , Bruce Richardson , Jan Viktorin , Santosh Shukla , David Marchand Message-ID: <20170105072245.GA19833@localhost.localdomain> References: <1481680558-4003-1-git-send-email-jerin.jacob@caviumnetworks.com> <1482832175-27199-1-git-send-email-jerin.jacob@caviumnetworks.com> <1482832175-27199-10-git-send-email-jerin.jacob@caviumnetworks.com> <20170104100104.GA6578@localhost.localdomain> <20170105062430.GA14618@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0034.INDPRD01.PROD.OUTLOOK.COM (10.164.117.41) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: f8ec81cc-14ab-4ddf-bd6c-08d4353bb40a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:whXtV4oYVFSam4J2i0qYEKsBCVIPn2TLEwRZH3wyXnaMMXI7cYwRjeDwbs8OoeI3E/V1KBVOneaTL6P9g3drSYF5DYgNSief1nsgzl/3bpcO4wl0HHDcRBSm68xV6luqC4xXIrurN7ifQ2Hefs4lSb7PaBI9rAYx7d7bVEFI+d0m36cUZULTFH+AgRiWkr5JcNqhf3kX2SiWeYShIEpQg+w8bN4xs5eR6DZeSReK3m5uSmqxPQjRK81hfS4LDi1C1j2JhxVuKukGbojTtgMiUg==; 25:T1DsG6IJXKj0s5PP/FfHYr/pZ/Jy2USL5KNvZ6McIC5hl12GF6d99HBu1V4mhfQ6DHLC6+TlZS1pK9/tWIODgKKPQGXt3QOxRYc/OwDHk55XKCwDzMjEHeutLX1Zudo1kcVMMinlpa6oKREYdtglrop2HKp/8gg7jN2ML3cOW9QT3SdXG52Hw/rJ26g/eyuQAMS8EPM1nkCiTfrUcjWYNRvwGEkTll0SRo9r4799Pjma6Ff7o8lUr3jslyW7bdb0XQHgfldf7GYp08tml5g/0YblqMrpCpbMqUasYSbenDXAwj6+pGAuYf+HAzE5dsP+LZnXvrtZICwsS9JGBJ/Z3zPZqKZYLoR80xHrvz5FkD54Uz3i/t60k3V9UP2Vkw5dtMChlnyGhK4z3QezRLYugf154TMs52gO7No41uNRoFbKC+1iOWF7qYqcyY0lJWW0TJL38eNQgQOj7f267sAt6g== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:m47iIEbYqX5QtN5bjHiAweS0+Yh/7BlwBgVigwJnNKug1RTWYEUnrwf7OBsc2pg43gXtOHjSNChZRw7OIt07pfnKIXXD74lH0/PCxLzuC14QaWK7id+XgsAC+rKqjZQwHbpeTPKqeVcjTwWkTKxOho3OCvO4UEM6Ad6IwEAV8HLIpoOdDE0lkQKaKnMUzuCg4xwkSN4hxlR9M92Jhs62Pn5Y+0NkI7PYgvF00kWnvkN3xiGECwxHSrI9XQ5+GdFh; 20:J1JCYm83QXO8rux1phIonu1VulnaaAza6rVZVM+dY6Dx0VCoYEzjKck1n/9pugzV7y7SjT5JHoAkNnACYWQoRdl0Yw5ZpYf9FEoCjH1kL4xTBFjmLbDn7EfsPrkUZYRh4xiAQxnMf4+5PKvkiUTR2fgG1TzFy3TiG9MLUzgfWMwDMdGhf7yn0XLL/7IGGvHUWRRWFsipt60u9gnQQkatzP/BQMZjvw/cms0Nia8mws3PvYp8/gkhvsM7Y990Hvi9xAGwhzxUEE+ktk5J0uvWDI1+FRErFoZxAPoyJSK0FqFYoreg2loGmmb3i8t8FOmvs80M4LSnPB82D1qKGyOEckizDixV7xt/qGw9hNT3qDW3EEx5cwotk4ypmxNZdslkf0WYj7Ggfqmb7EFfnN/CkVJ22+OFi6szIfWYh63JP42XtlzkAisXLuipHzU8y2oETj3eFG/pZEcofpbX3Vl4/Bh158TyPOkNfmqe+aMsXw/7Pg7Dnf0lLKm2m4BzQAE2sA57PDyC9gkDLMAfoM1y8mATpTOisb0qS1H6oxVOqjUiXeySgp/r/y9rVt0IU8hqiU+4n3jRKN1x4JqKLr5qE+dE0tOhFsUyVhsbmnMt59U= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(58145275503218); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:/sxVDIor96tv5OdgBcYRJ7Qj45+cxpQqzRW83niL1G/VPaYlPyknYZM+OIMheSutNFGQJniCxFk2S9z9TocUNjn92CuSL4TAFDVEK0kDIbBQ1ZlkdHfh6MkJLP663kulaulSQbhzZWGCJ6QzGHYez4u46GKkkgwzxDkWsa/N64qWsCG00bMowVGcwE2RDgct+HX+c/q18CO6bOn4kS+wU4mGG1OoysrYF7SwBPbln2lQXk+v6TeVLMlCN9PZJbrSTo+Zy66SIK3aYabsE4+imEWi1BR+MbmgqBqYlK5JfOVuDHOirNTxtW9AVGIzlbzHxCiYvXdLWISLxIR+Pe3jpme0346//J3L1ZAL+u4znGRF9vuu73I5uduujqAbvJ1K5xS9HbF/MwfdqlK//U8ROA4FiVn/jD/UZX0crOp9+ofCTzYHhygIrwDSvCNn0KgAxu49z3oFcnu66aQ84CvGYs6tHXVQf+Bm+UV9rJ+vyEX/Oe6rREvdxiFmMgmVBlUwQ6WPMp1I7U8JMHo62Ualo7Ett/lB8z5L2rgPrU1gqtZ/fPBDx/crXYKjC7zTgu9+Nc++Itv2PnLDTWyuOCLE3sWzT9UeBjpltdImZ0R18SfYlPLRGh5mxMF+juEnv7SQ X-Forefront-PRVS: 0178184651 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(24454002)(189002)(199003)(68736007)(50466002)(6306002)(6116002)(2906002)(4326007)(92566002)(23726003)(15380165006)(33656002)(38730400001)(25786008)(229853002)(6666003)(54906002)(101416001)(66066001)(2950100002)(1076002)(5009440100003)(97756001)(54356999)(5660300001)(93886004)(46406003)(4001350100001)(110136003)(42882006)(50986999)(76176999)(189998001)(83506001)(6916009)(97736004)(9686002)(6506006)(61506002)(47776003)(55016002)(81156014)(106356001)(8676002)(42186005)(105586002)(81166006)(3846002)(305945005)(7736002)(7099028)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:c248Mb7ete6vYKRc4fDu5lb62fNb81yj1cX5OKg?= =?us-ascii?Q?uqeRtUw0kgP14A8lQ7PyGH+e7HCnIe+BBICouSH06INYCXLJKrJye98pT3xh?= =?us-ascii?Q?fn1saPuG90uL58IDKdNQYKmxqu2f4vNxUIeY/vm7ZHhvE3mt6BdBStm0FKl7?= =?us-ascii?Q?3xDRdAlMFRTNoRGEhmg/tB3KCi8/tnoj+2I2r/Ns3Pi/rBaSwj9sZ8huyON8?= =?us-ascii?Q?BC6IWxkdiPunKg0WIQH08m+Bwn711YCKj33/aBcrS2fRKlSimba3oQXk7acm?= =?us-ascii?Q?N7YLLZj5BrWvlFwrBzn6W4Ptx3TSYzZSvmgWKp1WD1y9T+WjmQwXckRX+ebC?= =?us-ascii?Q?owsrKsHHVUP6to/9EVl/Z51H8a14tEe08jkwrhpXjp33eJwaTOr795RtWw6F?= =?us-ascii?Q?oQfuTTfeRrlss2CArnKVAutnXFldMYo6RYa7n5digR545BjxUMFysCHn4paC?= =?us-ascii?Q?eY3i0U4zpZflY//3ddECe9fU5B9ETXCgqa2XNgJ/VN1ZCpyNoTGBFodjViEy?= =?us-ascii?Q?xmztHY2tuHLiPCTf2EZhtBW2BIvB81SG/MDgG1jMfUxIRUHLZVioi9mn0amg?= =?us-ascii?Q?+JqE+btLjvvMmuFLEgyuu0xTx67nygzPMqqUULdeBfLiUzfcsie0ubSqbUSX?= =?us-ascii?Q?eUejxgZfOh14cnjJaxmu8NWY1DuW2mAFlSltaGKpr+0OBWXZ03NDwhvPK4AB?= =?us-ascii?Q?z+I4YQFErVY9VXXYBJUTuRFnYcnHxfXCOy86DP9VJIY3LlyqOlsT+mrwBF7k?= =?us-ascii?Q?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PgH0wK+IPkC2Pzx8x48mQzOD3mgvKgalNSGP7OOfUSorPOONVoUXSE9JRGtkrm/+F/hnHnvVBSMSJxHYZds5FORSqLeFdz/uOudfBTyxwYtZ9ajXOOoX+aJssZ0mF9fg+qSJYRJLQMj8dD/7Kkbhf0IKpKyrjLfql9mpzNxBYIXyRK/lIBBafmHzeP5mKClag=; 5:67LPqiShdzAoSKkU6zGhpgwgNjmrSUnwnUzb3LJvc/2vJTMDCFwdC8vE0YG579DTju150ZRWCHQ+K+DyTcTdicUdDueUR1gvNpBWE5zJ0HFYWtqx7bJj7V1NAS+Cfg/LlGey+G2SsVygFn4QVbsjB8DpEmS7JaJK09f9xRLwpGw=; 24:06juzwKaI6DQJFOj48noluraeqwTFK8sWnDUcsagAixmZJMGUViuT6ZQjuSND05kTbFo+3K4ATXYVZnMoRwelCZ06IHIESI2BKY3AKlABXQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:VW/DZi+sRyciykXYbuQL1uDuYFLvMF0F31tgHXHhdIF76OXzuvH7+sv4pSXrZtFHdYfssXedgCGVZ1Y7II8F3tKfU2GW8AAJqsrKREm3If+LLhiknYFUaM2s2XiihgwiBUNh0aAUuSORALcMtUph13wgaFJqxjSyGcaCBa/V06E3WemlOB+VuDU1OdSAyxuXR5MyZqjZDdftzhwGhbRDhHug054E47ZymLjqum3MK8TRtRQUbvjgiSu1JwVctpQ2vkRJcC/u9S14+y1JMdN7ObnOPBoIEvZqTNFleY6Pp0du6K4IDKMFrleSoIZ8dkixh6AvM9DvxG78RtnZD0EDaGjgR3vQY4BaUhPqbKnQe6W+hOAu7voz3iMQU+9ErXDryt3PynI9CXM//bv8+ir+gwzjqecDkSZDICLNK9L4lOjtWj1AfWQ0Sgpt3Wh5Oq7Tsq6HSKW9oP7+QdVfrtSC+Q== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2017 07:23:07.5520 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: Re: [dpdk-dev] [PATCH v2 09/29] eal/arm64: define I/O device memory barriers for arm64 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: Thu, 05 Jan 2017 07:23:13 -0000 On Thu, Jan 05, 2017 at 02:47:27PM +0800, Jianbo Liu wrote: > On 5 January 2017 at 14:24, Jerin Jacob wrote: > > On Thu, Jan 05, 2017 at 01:31:44PM +0800, Jianbo Liu wrote: > >> On 4 January 2017 at 18:01, Jerin Jacob wrote: > >> > On Tue, Jan 03, 2017 at 03:48:32PM +0800, Jianbo Liu wrote: > >> >> On 27 December 2016 at 17:49, Jerin Jacob > >> >> wrote: > >> >> > CC: Jianbo Liu > >> >> I think it's better to use outer shareable dmb for io barrier, instead of dsb. > >> > > >> > Its is difficult to generalize. AFAIK, from the IO barrier perspective > >> > dsb would be the right candidate. But just for the DMA barrier between IO may > >> > be outer sharable dmb is enough. In-terms of performance implication, the > >> > fastpath code(door bell write) has been changed to relaxed write in all > >> > the drivers in this patchset and rte_io_* will be only > >> > used by rte_[read/write]8/16/32/64 which will be in slow-path. > >> > So, IMO, it better stick with dsb and its safe from the complete IO barrier > >> > perspective. > >> > >> If so, why not use *mb() directly? > > > > Adding David Marchand, EAL Maintainer. > > > > Instead of rte_io_?. I thought, IO specific constraints can be abstracted > > here in rte_io_*. Apart from arm, there other arch like "arc" has similar > > constraints. IMHO, no harm in keeping that abstraction. > > > > Thoughts ? > > > > http://lxr.free-electrons.com/ident?i=__iormb > > > >> > >> > > >> > At least on ThunderX, I couldn't see any performance difference between > >> > using dsb(st) and dmb(oshst) for dma write barrier before the doorbell register > >> > write in fastpath. In case there are platforms which has such performance difference, > >> > may be could add rte_dma_wmb() and rte_dma_rmb() in future like Linux kernel > >> > dma_wmb() and dma_rmb().(But i couldn't see all the driver are using it, > >> > though) > >> > > >> > >> But there is no io_*mb() in the kernel, so you want to be different? > > > > It is their for arm,arm64,arc architectures in Linux kernel. Please check writel > > implementation for arm64 > > > > http://lxr.free-electrons.com/source/arch/arm64/include/asm/io.h#L143 > > > > Yes, I knew. But I'm afraid it will be mixed with dma_*mb by someone else. OK. Got it. To me both are totally different. Feel free introduce additional dma_*mb* then, if you think its solving any problem in DPDK.I am not seeing any performance different between dsb sy and dmb outer one. If you have any platform that has performance difference then I _think_ you can introduce dma_*mb()