From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0049.outbound.protection.outlook.com [104.47.33.49]) by dpdk.org (Postfix) with ESMTP id BBCC21B5DE for ; Fri, 3 Nov 2017 13:48:07 +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=B3ACyn36aH/v/FVvNbadW8jOECYKGI60EOxUoU+BQhk=; b=ceBADI1tJesKsTTBRal4exO+JnD2WBPm/2JdOocLa7uza3HmgwcY/Ez1g0DN6hN7MwaX0gQeeHWZzA960W0o9ITjNXJANnK3MNleCpTJrmodr5o7wo6Da5aJS6ZCI8ZImNZFZNVhIWlpgRiV8sTHPTdsLpFB1HmpGIwj8bBM5+M= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (171.76.99.7) by SN2PR07MB2528.namprd07.prod.outlook.com (2603:10b6:804:7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.6; Fri, 3 Nov 2017 12:47:59 +0000 Date: Fri, 3 Nov 2017 18:17:41 +0530 From: Jerin Jacob To: Jia He Cc: "Ananyev, Konstantin" , "Zhao, Bing" , Olivier MATZ , "dev@dpdk.org" , "jia.he@hxt-semitech.com" , "jie2.liu@hxt-semitech.com" , "bing.zhao@hxt-semitech.com" , "Richardson, Bruce" , jianbo.liu@arm.com, hemant.agrawal@nxp.com Message-ID: <20171103124740.GA20326@jerin> References: <20171023100617.GA17957@jerin> <20171025132642.GA13977@jerin> <20171031111433.GA21742@jerin> <69adfb00-4582-b362-0540-d1d9d6bcf6aa@gmail.com> <20171101190420.GA21407@jerin> <8bc4095d-301e-3e99-9644-27848d97e9bc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [171.76.99.7] X-ClientProxiedBy: MA1PR0101CA0069.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::31) To SN2PR07MB2528.namprd07.prod.outlook.com (2603:10b6:804:7::6) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e6fa5374-d862-49d6-449c-08d522b91f46 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603238); SRVR:SN2PR07MB2528; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 3:94g03F7xB6ExQ+8/SlYhshpa7DTNDSxPcqnE+CUR3P6Wrh+EPcJyKViUiH1VgMQF79MTdr/qaDVO21gmnX7SDmoDc2tzQSQhCmfLGb2zWtKlLUEli77W2Jj51PIP8RQreHRG3r6nGrmZjkYY1kN1R47SYDHJAFgIVPh1L3Pz+QLEY1jNn++49YLxCWdqR7vK3WSAUeAAssYRhBcWq2q10VerE8EjB3PL2Se9d6ETAO8gD3tCcyFOlwpwNFdC9NpD; 25:9ojXpXpAUUOMov1C8XiOd6PMNpXv9KrnAI/0d/9S8717alJsdQGvKii5Gql/3a7IJjto1u40aEfb52WTU67mMpnf4QwoWYf/S6y5BmZ3YT7SlOJsaa8SwqlBrjaTywCsO0ABbHrxT0RvnI8qnEPJVWr3YEt6ou7R2V4pbX2QFbeFbNSARsvCgtTYK4Do6DVQ71TkY9hSp7fLoxu2guNubZaqrKcx3XZgs1rGVJh/2dyUQJ8AjmokdqY8lL8xw23hr6R+dXLsXTSuDRvAj8wEx6R3cTthzCbto2HNrQn8Lymw1FCcs6T8bgyOxfHV1AxeniOy1+dK0PFIJ4jCMZOqhg==; 31:I/15WJiZl8Qz+NLaqB2EnzJp4b376bq+amY68Lq7I29qzjutKpfF7gkRw1bm6OTQLvyLKfjWd31pQtQpVjSsnBJTnyZuN5jaLKEPwAApctak8B0fpfNdklwg7y2TKW2BeVUXdQGVN8Ml/Lykz7SZPbqXStYb411gmEbiHLXY8DvBRNAsTKjODx2PCmwre184wOzKd+YqHBaMmEMzB6KTuF4YGZB88/NnJuWB0hjtwRo= X-MS-TrafficTypeDiagnostic: SN2PR07MB2528: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 20:lYEAACbiuiUPi1HX4HzFUyER1rI+n4wCpMItweDhLytytUyyWF+u9iUVIe3fDRI+1FnD3m8JPJIRV8qigSvtKnZGLq2ge2iWlGS64EFugPfC83TY1OBiKyRxk9RjxR3OL+LPbasxtLw64qukCBmvKyrWhhAOxzNYZBRKpTFwMVc7TmpgAOlxIr/L41fGpEYTwfqQcuTt0theLmfORnecM1QUfnGgQ+E34gwTcwF1JZ2o5X03ao+v2eRnZCYU1aiUdNf8BmkpXsAtqI97VPT7fXc2VCJriP8U3MWk9jsU3iYRfXpDTwSAFP+f/5obRhIg6Hz9+pP7ZdxN7Gjxxq5oJGLGWYb7ALexRcKZW+s89Rn1Dd6Dcl7tu4z7hSLiM+FrMsdadq1MqKTfEBpODDv5zS7e2AJBoMP/g98N4oB8x+vl4zA5JwI0AjjhUY6j5GyGvqmutI/T9LCcadaUNZcuOvR9Mwr6OYEXdPYJi9AXTytMxziOwk4wR3c7lJjGgkscyh0xNftoiHQMmiM27ha9bmhwT+eoizTy2kbYhQUyBXGOfb+43W/x0uWofFE9XUKEaNL1+xS8tCQOJl0n1Rvrktxt8ov96QJqdswo9DyLTkY= X-Exchange-Antispam-Report-Test: UriScan:(158342451672863)(180628864354917)(185117386973197)(130843839470238)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(3231021)(93006095)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123560025)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN2PR07MB2528; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN2PR07MB2528; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 4:dywWKPKgttBRiFHigBhZ40DqLxZv1J1vyBMQD641CB00VQODEqhQNpmajRgS7u/9KwHkwmS0X4xMmYdduw6yZa9lLcOpi7D0m5FGzrfX7+6MzjWdi88d/66OMrn0YtDHO+JySU7zo3rj5SbRjEn+HDf3uiqMJVKgd8Vp43nHGrYkUoQJP1Vv231qjW3Nw1Y0mppCFo/UodLe832xmxTJYXVk7qE/qcs+jbBQ6Pq64KB48O3TEF6F3d4LG7bgKDz7PO0StooiBfOaxIw8MUXWieo7V9o0lI5/1eDjgEcRfjCs/ZiHhGs1NmTq3+mOZ5WbQs9NoI9X6bRreekQrcdzvlZE8Nr7/uKEMEAvBeWbeSxR2sQcyFAS2Tyjansr8xu6CpKnt98Ycq9UUQxm5Ns8Umlq8yc1nap3WtamaiK26B7rhT4Sjuhs5qe8486Eud6pHE0Jr/HhSX0Shb2jPAc8/A== X-Forefront-PRVS: 0480A51D4A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(13464003)(189002)(199003)(24454002)(51234002)(55016002)(189998001)(83506002)(4326008)(105586002)(106356001)(8656006)(16526018)(72206003)(6246003)(478600001)(6496005)(25786009)(2906002)(2870700001)(9686003)(66066001)(53936002)(47776003)(58126008)(39060400002)(316002)(7416002)(42882006)(6666003)(101416001)(6916009)(2950100002)(93886005)(50986999)(229853002)(50466002)(23676003)(97736004)(5660300001)(68736007)(76176999)(54356999)(1076002)(33656002)(6116002)(3846002)(33716001)(1411001)(7736002)(81156014)(305945005)(81166006)(8936002)(8676002)(54906003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2528; H:jerin; 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: =?utf-8?B?MTtTTjJQUjA3TUIyNTI4OzIzOkQxNHFHV0lqUHM2bmxTSnpLNnRPaGt3aXUz?= =?utf-8?B?UytZcy83QVhNRHd4YzhPMDVYWWRCK08rQTdXbXpXMUZmQzQ1QSsyVjJvcWFH?= =?utf-8?B?aFg4NXhiek9ncnQ4Zk9UQy9vKzhvbllwYmdBelZNL3BIS3lTUzk4RzErVkg4?= =?utf-8?B?bmdtVUE4eENyeVBWd01qMVhUc2REaS9nY2wwM3BkdWlRRnM5d016VW00ZXJ4?= =?utf-8?B?YkJVeEQwd0FzRWxIMWVOZ1d0Ly9qWGJTZS9vRG1ISFNMY0hPS21pM1ExMHh2?= =?utf-8?B?Tnoya1lHZ2hjQVBQWTA3dW5SR0lvcWNUWG93RXB6NlRNODU2bkJLUnRlc3J1?= =?utf-8?B?dHZ5Z2h3dVAvL0RKWjRFeWNJTEY2WFEyRzVpZXdmdTJIL0themxZd21CeER1?= =?utf-8?B?ZmZuMEhSR01SeStrZ0gxejlsRVFQSUJkMGlnVzFQUCtNVFozVXM5N2Z6UWZa?= =?utf-8?B?eGNnaHpFb2k3djRkWVhyeFBLd1RlWXdQQWsrWlA5K2o1NjBhT050TDFUUjRo?= =?utf-8?B?RTR6OUI5ek5oMzRtWnhGOWV2MC9BcTlaRXJUWjdTMyszSURZd1Q0Mmc4aFlk?= =?utf-8?B?cGlUZHozYm5hME9VWVBvOVdXblhYUmtOcDBiSDY4TllhYzRWZi8zejBFSE5U?= =?utf-8?B?TjllOURCOHQyVzI4RG1WQU1qTmdxbVVZR2lZMDMxT1psMW5JWTRhRkZubGlx?= =?utf-8?B?aStsNFF1O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QwEzap9EKUd8xRVynwjNQb0IkuPxWvk1/HjIaHs159MQAdKYwfHUuJQ8fd4t25cFyHI4k54RflhjL/AhDIVheebkx7yq16pFjJoFlM4c/Qg5rtR1CxmdeUCRkD86edHyMRidVN1vlFRC7eOThY6lVDVN+VGnsWQpQ1GHxGOYPNAaLmv33t3uJ43H/qOq9CG2FMtUEfUD5zJKsV8Z2rLtwMV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2017 12:47:59.1317 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e6fa5374-d862-49d6-449c-08d522b91f46 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2528 Subject: Re: [dpdk-dev] [PATCH] ring: guarantee ordering of cons/prod loading when doing enqueue/dequeue 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: Fri, 03 Nov 2017 12:48:08 -0000 -----Original Message----- > Date: Fri, 3 Nov 2017 10:55:40 +0800 > From: Jia He > To: Jerin Jacob > Cc: "Ananyev, Konstantin" , "Zhao, Bing" > , Olivier MATZ , > "dev@dpdk.org" , "jia.he@hxt-semitech.com" > , "jie2.liu@hxt-semitech.com" > , "bing.zhao@hxt-semitech.com" > , "Richardson, Bruce" > , jianbo.liu@arm.com, hemant.agrawal@nxp.com > Subject: Re: [dpdk-dev] [PATCH] ring: guarantee ordering of cons/prod > loading when doing enqueue/dequeue > User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 > Thunderbird/52.4.0 > > Hi Jerin > > > On 11/2/2017 4:57 PM, Jia He Wrote: > > > > Hi, Jerin > > please see my performance test below > > On 11/2/2017 3:04 AM, Jerin Jacob Wrote: > > [...] > > > Should it be like instead? > > > > > > +#else > > > +        *old_head = __atomic_load_n(&r->cons.head, __ATOMIC_ACQUIRE); > > > +        const uint32_t prod_tail = __atomic_load_n(&r->prod.tail, > > > __ATOMIC_ACQUIRE); > > > It would be nice to see how much overhead it gives.ie back to back > > > __ATOMIC_ACQUIRE. > > I can NOT test ring_perf_autotest in our server because of the something > > wrong in PMU counter. > > All the return value of rte_rdtsc is 0 with and without your provided ko > > module. I am still > > investigating the reason. > > > > Hi Jerin > > As for the root cause of rte_rdtsc issue, it might be due to the pmu counter > frequency is too low > > in our arm64 server("Amberwing" from qualcom) > > [586990.057779] arch_timer_get_cntfrq()=20000000 > > Only 20MHz instead of 100M/200MHz, and CNTFRQ_EL0 is not even writable in > kernel space. May not be true, as I guess, linux 'perf' write those register in kernel space. Another option could be write from ATF/Secure boot loader if that is the case. > > Maybe the code in ring_perf_autotest needs to be changed? Increase the "iterations" to measure @ 200MHz. > > e.g. > >     printf("SC empty dequeue: %.2F\n", >             (double)(sc_end-sc_start) / iterations); >     printf("MC empty dequeue: %.2F\n", >             (double)(mc_end-mc_start) / iterations); > > Otherwise it is always 0 if the time difference divides by iterations. > > > -- > Cheers, > Jia >