From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7360BA00C5; Sun, 26 Apr 2020 16:20:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F32072BE9; Sun, 26 Apr 2020 16:20:34 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60078.outbound.protection.outlook.com [40.107.6.78]) by dpdk.org (Postfix) with ESMTP id 4B9222BD5 for ; Sun, 26 Apr 2020 16:20:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g0EAit5kSoZd5NvpcWsRIo6Vt61nsN+qjEWprm/OyrI=; b=zRTN0L7aV2vA8Du2MLw6q2vppqSruYMAvAyWtIORbOXSr2P/andjtfS8lyGEcLyxtQFj4gI8zFUqCgM/GMv+bP0tchOwm2cyrEwxkFkp8C3ui8kcvn91scQWNcJoqVvcgf+ojXcS3D7DzlqRiKsX7xIcNMCkyofECEhK1i/Ndgw= Received: from AM6PR08CA0045.eurprd08.prod.outlook.com (2603:10a6:20b:c0::33) by HE1PR08MB2844.eurprd08.prod.outlook.com (2603:10a6:7:2e::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Sun, 26 Apr 2020 14:20:25 +0000 Received: from AM5EUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:c0:cafe::80) by AM6PR08CA0045.outlook.office365.com (2603:10a6:20b:c0::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Sun, 26 Apr 2020 14:20:24 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT038.mail.protection.outlook.com (10.152.17.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.19 via Frontend Transport; Sun, 26 Apr 2020 14:20:24 +0000 Received: ("Tessian outbound 11763d234d54:v54"); Sun, 26 Apr 2020 14:20:24 +0000 X-CR-MTA-TID: 64aa7808 Received: from 0eabae0098c9.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E5BDCC86-5193-4D0A-8D4F-92DD05E846EB.1; Sun, 26 Apr 2020 14:20:19 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0eabae0098c9.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 26 Apr 2020 14:20:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WjYx6adrfMkoqwUullEIo8m+8PSPAOorr0pf4KmL3PsQbOfATfL4CrBPDUkZgqGTvC0x5nOvXEsae8gnLqjNGUJNsh/R4SNluSbXlPQqMFGOl7zaY2udN7VOQeq2kH9H5P7k2CCqY7qt7iDE/ICkRJYCrw/3mDBoZgW/TDAKFO+cWRfBHP16Ip/JQ/5Q2Oa//jOYMK/F9Z/7bJzmHS8vYUoUhoP2EzEsSjzkq+gFD/ZlP4MueSSBL134e06b59iPOHQe1C0nA49oSKxiNsonEOgVq2gT1+g3Q3vtm2vgrRyxaxaWDrZxPVfxRhcCydo9Ol3wYU0eNZPsE9KJghoiFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g0EAit5kSoZd5NvpcWsRIo6Vt61nsN+qjEWprm/OyrI=; b=bHK4XwurYci9bq2dVQmTLSnjs/NRoumU9A+zoQlaIXYvZ1uzfBwckBnflAIx7eA41dKt7e27tRL2DYKeZealV73GCkaO1c2yHHmy5dZx+QIClU2DXAFuPnxtFyB1sL7hf5MDFVkdfxhe/SnVQwV1Q0qUoq61sRWa2Sozt3bOCWBO39a/Uxmf3H0V/xKToeir6WSuQd/0N7SI4UxI+yxmKTPnSAxq2T4mA6IFVR5yfeXhiiRBXIR09kig8xpaov0AdfLQylYlruJXy8CBbeAfe5ThBRW6Zh0Xbm1+yhO9GpqnJUcOoLin0+QVcsxQhY2FY8dlHIzYlIKZ9Pnx3DP0gg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g0EAit5kSoZd5NvpcWsRIo6Vt61nsN+qjEWprm/OyrI=; b=zRTN0L7aV2vA8Du2MLw6q2vppqSruYMAvAyWtIORbOXSr2P/andjtfS8lyGEcLyxtQFj4gI8zFUqCgM/GMv+bP0tchOwm2cyrEwxkFkp8C3ui8kcvn91scQWNcJoqVvcgf+ojXcS3D7DzlqRiKsX7xIcNMCkyofECEhK1i/Ndgw= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (2603:10a6:802:b2::11) by VE1PR08MB4735.eurprd08.prod.outlook.com (2603:10a6:802:a2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Sun, 26 Apr 2020 14:20:16 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::785b:54ca:be80:7b66]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::785b:54ca:be80:7b66%2]) with mapi id 15.20.2937.020; Sun, 26 Apr 2020 14:20:16 +0000 From: Phil Yang To: "Carrillo, Erik G" , "thomas@monjalon.net" CC: "rsanford@akamai.com" , "dev@dpdk.org" , "david.marchand@redhat.com" , Honnappa Nagarahalli , Gavin Hu , nd , nd , nd Thread-Topic: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for status update Thread-Index: AQHWGgl3k84HNe3Ne0CXYwTugL1AB6iKFsmAgADgx0CAAF4NgIAAIAPA Date: Sun, 26 Apr 2020 14:20:15 +0000 Message-ID: References: <1587398752-9345-1-git-send-email-phil.yang@arm.com> <1587713042-527-1-git-send-email-phil.yang@arm.com> <1873559.ZhSLo9btvA@thomas> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 6a943fb9-e24f-4220-9e2b-3de52a226dc5.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; x-originating-ip: [58.39.116.39] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ea10718e-60b2-47de-cc0b-08d7e9ecf5f9 x-ms-traffictypediagnostic: VE1PR08MB4735:|VE1PR08MB4735:|HE1PR08MB2844: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:8273;OLM:8273; x-forefront-prvs: 03853D523D X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR08MB4640.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(376002)(396003)(39860400002)(346002)(366004)(8676002)(33656002)(66476007)(66556008)(64756008)(66446008)(15650500001)(71200400001)(8936002)(52536014)(55016002)(9686003)(2906002)(81156014)(316002)(4326008)(26005)(110136005)(478600001)(6506007)(53546011)(7696005)(54906003)(186003)(66946007)(86362001)(5660300002)(76116006); DIR:OUT; SFP:1101; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: B845RR3E6vAQPj8C/s9Hw5nihxfftbuX9TKy5DcbVW/JtGaHx502JRRvQ2QMkINzTq294gU+4HgdXVDGY8TEjurTnbZEgiQEEVKTCFjK1hiK89JXKDWLrxPl/IwRKY+QaQOv6WhvJoMtnpBQZ/JR+KZPMPMdC8FV+rmbZUMyOox2LBKrHt+8ZP1sokVxtZWODCYuBMFX5RPVwzOH2JalHeGPGCWdzNU5UcmjeSfxbsGeYNowi+N1NHYBcd5yZl0D1jfhfLXGaFFYtHL5bLeecVX7CnwrV/9egYfSq7T3UN50/gO7T/pmS98cEYHECr7S7pkHh7lizVdtNa78btG4JQgiNlF8yN4yl38L/ZO+0S950olke4vFdJqQRcgt/ov7CxyXlWcFs5NUYbP5Mhmm/heYEov64lycZ2GgdRl2oG+LyBK7v+P7ahRlzcpIJOZ5 x-ms-exchange-antispam-messagedata: rTKl5xSaOiYrHROf8SmUseee0y7zmvzhhIy09aUOflNf9l9i/kp/8ZoapbMEKHnYTSIqP8WxjNqVu9CDzuzs7CcfQv3oM9JAiDg76EA9eGFGD6/Cx9AXGLDNzsdy16lryG26jIYtGWRwta6vX+mq1/C8ra+UHzteUpby0nnGpelPvG5Y+mtlBiHUAXhB0JLfg7ZlBXHFyMw7kUCjDoP5xyz04seE07BTJ/io4eS0q2IAOV91FEJzH2UO9g4OdyKqO8CDBTUDOgWzEEioAwn4NyCP92y6UZapZXYea+1Zyw0QwC6ysx2XHue+T8uF8ywlClooDXE6wogYBuhqEl9wRVtZppAga76DdBZUr62QBIOCyX4lZV/qGE9Uh7+ELKiVdXykEW24wXUvS2jy/0t2levg1qtbm2hNwCIFkw0jdeFhgl+/icB5iZx/7Px0Z6vmOOwbnha4W76N6uWO6bsfTUSrFKFWCD1frBALOQbq1B5M7bbinvDTQf4zc7pe1o+mzN9WVxvGRdbxsEgiKpiweIyboPV6k5zEtdzhK8nkc8yBrbK6CBOoIFPyr6UzEG1mLiBk1llkM/VBFyND88IYQIFdqIHKblZ8cQ7zm7gciQ9DDjllqZa0jRArADxfOn2DULFDUEkqF78bCP8Q9eRCPEYq277/ZKgeXiCg23Vcq7DS7e+EapZL6ryW7dOJ7hhj+QiAYh1KyOkyQmepepVDVpd9LMDPLtumJmkDXsNFK+MykGCyuqUBuJHeLoWJ+gur/XfKyueF/z7gbz0WMt5EYBoly+PAG4zzDIM/NERW7jM= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4735 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT038.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(396003)(376002)(136003)(39860400002)(346002)(46966005)(82310400002)(36906005)(336012)(52536014)(316002)(186003)(81156014)(5660300002)(9686003)(8676002)(8936002)(478600001)(55016002)(6506007)(2906002)(54906003)(7696005)(356005)(53546011)(15650500001)(86362001)(81166007)(4326008)(70586007)(47076004)(70206006)(110136005)(33656002)(26005)(82740400003); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 2a4fd8a6-a9f7-4b4a-d1be-08d7e9ecf116 X-Forefront-PRVS: 03853D523D X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i8ZmVqTggDQay73SW3B4M5rWHyIHrz4oI2e00eTqrBWn1Z2BwWMZzQfee8tkDS2ms1n6YuEc8MXjagqzwh/KmGwCRb6IV6iuIuXfUZv6hdfiiQjORfycBW4dOsnDtnC5g2iXD3hVDuSQ/yqz1TVL5IjqcUG7t4v/tqwWTF62b+VN9+ICWIwgu+lUnBByq159M0BhuXTZ+CW0AubyMCWThq4x6P/g2TGAImdDwPyAgtPI4tjsREYp+RfzCbG++yazPNNFGTcYIOeWobEz+g8mkbA4s3lCB44fFGHXHzbjNMEtEUCwJEQSV8WwEWoKEDhOXvUsrieKWYGpMtgEnD0DtlApnHCfkDGRCVom0hdlgbkxnlg27+BzEcBJSK6st6d9z6LkXKFs2mnHr+9soHUJc/02SJe1uzvFeN6wmPL5VgkqJLLnYx7gy4gIc8SALwvfHYDmyqg1vX+SIeS0Tfb8vP2V5D8hSWNKNAIsmhMozY4b+ou952lqUFH2oUC0L0t1yGuloOE7igOWI8L4HjFunQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2020 14:20:24.3957 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ea10718e-60b2-47de-cc0b-08d7e9ecf5f9 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB2844 Subject: Re: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for status update 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Carrillo, Erik G > Sent: Sunday, April 26, 2020 8:19 PM > To: Phil Yang ; thomas@monjalon.net > Cc: rsanford@akamai.com; dev@dpdk.org; david.marchand@redhat.com; > Honnappa Nagarahalli ; Gavin Hu > ; nd ; nd > Subject: RE: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for status up= date >=20 >=20 >=20 > > -----Original Message----- > > From: Phil Yang > > Sent: Sunday, April 26, 2020 2:36 AM > > To: thomas@monjalon.net > > Cc: Carrillo, Erik G ; rsanford@akamai.com; > > dev@dpdk.org; david.marchand@redhat.com; Honnappa Nagarahalli > > ; Gavin Hu ; nd > > ; nd > > Subject: RE: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for status > update > > > > > -----Original Message----- > > > From: Thomas Monjalon > > > Sent: Sunday, April 26, 2020 1:18 AM > > > To: Phil Yang > > > Cc: erik.g.carrillo@intel.com; rsanford@akamai.com; dev@dpdk.org; > > > david.marchand@redhat.com; Honnappa Nagarahalli > > > ; Gavin Hu ; nd > > > > > > Subject: Re: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for statu= s > > > update > > > > > > 24/04/2020 09:24, Phil Yang: > > > > Volatile has no ordering semantics. The rte_timer structure defines > > > > timer status as a volatile variable and uses the rte_r/wmb barrier > > > > to guarantee inter-thread visibility. > > > > > > > > This patch optimized the volatile operation with c11 atomic > > > > operations and one-way barrier to save the performance penalty. > > > > According to the timer_perf_autotest benchmarking results, this > > > > patch can uplift 10%~16% timer appending performance, 3%~20% timer > > > > resetting performance and > > > 45% > > > > timer callbacks scheduling performance on aarch64 and no loss in > > > > performance for x86. > > > > > > > > Suggested-by: Honnappa Nagarahalli > > > > Signed-off-by: Phil Yang > > > > Reviewed-by: Gavin Hu > > > > Acked-by: Erik Gabriel Carrillo > > > [...] > > > > --- a/lib/librte_timer/rte_timer.h > > > > +++ b/lib/librte_timer/rte_timer.h > > > > @@ -101,7 +101,7 @@ struct rte_timer > > > > - volatile union rte_timer_status status; /**< Status of timer. */ > > > > + union rte_timer_status status; /**< Status of timer. */ > > > > > > Unfortunately, I cannot merge this patch because it breaks the ABI: > > > > > > [C]'function void rte_timer_init(rte_timer*)' at rte_timer.c:214:1 > > > has some indirect sub-type changes: > > > parameter 1 of type 'rte_timer*' has sub-type changes: > > > in pointed to type 'struct rte_timer' at rte_timer.h:100:1: > > > type size hasn't changed > > > 1 data member changes (2 filtered): > > > type of 'volatile rte_timer_status rte_timer::status' change= d: > > > entity changed from 'volatile rte_timer_status' to 'union > > > rte_timer_status' at rte_timer.h:67:1 > > > type size hasn't changed > > > > > > > I think we can revert it to the original definition of rte_timer and ke= ep the > > union rte_timer_status volatile-qualified. > > Because with or without this 'volatile' qualify, it generates the same = code > on > > aarch64 and x86. > > So it seems acceptable to ignore it to make the ABI compatible? > > > > Thank, > > Phil >=20 > I was wondering about this also. Is the performance improvement on > aarch64 still the same in that case? Yes. it is.=20 It got the same performance improvement on aarch64 and no performance loss = on x86. I will update it in v4.