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 50F66A00C5; Sun, 26 Apr 2020 09:36:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDAD01BFAD; Sun, 26 Apr 2020 09:36:18 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2047.outbound.protection.outlook.com [40.107.20.47]) by dpdk.org (Postfix) with ESMTP id 8CE241BFA4 for ; Sun, 26 Apr 2020 09:36:16 +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=h/vL9WOlHc7057mFqDum+x1VJ2KZPJyCw81bIoCbrco=; b=oidXq8qX12sREfqxT+C4+dVYPCy7QIRLbkYja4q3jHE30x1fFz6Pc/+Q6Opm4EqazSmC2v0Y3+bFHlmqVA5zxU4SBxzZumMX2WOmylzEspdqFGN1qxzYU1cJFvmBcTXdYT5SQ2DXPIzn5amD95oR2bllf5XA9MzBzGCiAOxFoPk= Received: from DB6PR0802CA0037.eurprd08.prod.outlook.com (2603:10a6:4:a3::23) by AM6PR08MB3351.eurprd08.prod.outlook.com (2603:10a6:209:48::20) 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 07:36:14 +0000 Received: from DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:a3:cafe::88) by DB6PR0802CA0037.outlook.office365.com (2603:10a6:4:a3::23) 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 07:36:14 +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 DB5EUR03FT021.mail.protection.outlook.com (10.152.20.238) 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 07:36:14 +0000 Received: ("Tessian outbound e88319d7ccd0:v54"); Sun, 26 Apr 2020 07:36:14 +0000 X-CR-MTA-TID: 64aa7808 Received: from afbd567451e3.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E2F37DEF-5546-4851-8790-C2B4F6A5932B.1; Sun, 26 Apr 2020 07:36:09 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id afbd567451e3.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 26 Apr 2020 07:36:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OVlyE1AqrWJ4AJOdM8b/fZ9QiuoZng5XVBx2BmW3nz0EIYl7PI4fOFf32wJrc0Y0x1J2x078da/CRax5p6YTKNV8u94YCjE49nqGGsiV9jqlDINSUE+dIWyptYlfwZZxC3BUDrqAaO7gPUABxrWPNNHESlk+2YF4EpHykDjMmRXFl7SPfTUWLHi1tYBvRadJ64U6W9VO5K48KBUO3Ewojo7sUJ+FKVfCP7I0Nzby/nBigzDaiDG49EJBCmk4ofj0AT/co9H7dzhoscilJA5fkx0wPxXeBnMcg1AVN2T7lOhfl4ir1R5Zk3onDyGTdYgyzMuI3XxSDPaQpbCjhqamCw== 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=h/vL9WOlHc7057mFqDum+x1VJ2KZPJyCw81bIoCbrco=; b=K2HzIkyz1d1E9ZOee/KlT0FhqOoK3b5yZso96akgOyFXESyKJGb1vEFMMSIOEgyKM5E0WJ/Gec4dtSFMIskECdbcJQ58wVvprCTuOIUN1O0pFhkIUaXHyakrxptEapyF+A/byNs7TWCx19KewjnDbqUU1a+dxiEOKlWaqn2uVgTFryq9wKLmH7hrRlDS9GPisuwxwQvlOrVEnE5WpNFmLvw0rFqHoevUnTXgvTftPkggQPDfmwx0JPOQ0jXP+ek4IkxNc1JTwk+lcJHZpTBRojoqfFJ4L6ZRsI+EDtyKNmXvamIxMn2DELgykIn3DFC34WwbXUw5bqyEhfaXDfx1qA== 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=h/vL9WOlHc7057mFqDum+x1VJ2KZPJyCw81bIoCbrco=; b=oidXq8qX12sREfqxT+C4+dVYPCy7QIRLbkYja4q3jHE30x1fFz6Pc/+Q6Opm4EqazSmC2v0Y3+bFHlmqVA5zxU4SBxzZumMX2WOmylzEspdqFGN1qxzYU1cJFvmBcTXdYT5SQ2DXPIzn5amD95oR2bllf5XA9MzBzGCiAOxFoPk= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (2603:10a6:802:b2::11) by VE1PR08MB5007.eurprd08.prod.outlook.com (2603:10a6:803:10c::32) 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 07:36:08 +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 07:36:07 +0000 From: Phil Yang To: "thomas@monjalon.net" CC: "erik.g.carrillo@intel.com" , "rsanford@akamai.com" , "dev@dpdk.org" , "david.marchand@redhat.com" , Honnappa Nagarahalli , Gavin Hu , nd , nd Thread-Topic: [dpdk-dev] [PATCH v3] lib/timer: relax barrier for status update Thread-Index: AQHWGgl3k84HNe3Ne0CXYwTugL1AB6iKFsmAgADgx0A= Date: Sun, 26 Apr 2020 07:36:07 +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: <1873559.ZhSLo9btvA@thomas> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 21f31b0d-9e7e-46c6-9b9a-087cf4290a41.0 x-checkrecipientchecked: true Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 1d1c6600-8988-4063-9085-08d7e9b4800a x-ms-traffictypediagnostic: VE1PR08MB5007:|VE1PR08MB5007:|AM6PR08MB3351: 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)(346002)(366004)(136003)(39860400002)(396003)(376002)(55236004)(8936002)(316002)(54906003)(66946007)(7696005)(52536014)(5660300002)(66476007)(8676002)(76116006)(64756008)(66556008)(81156014)(66446008)(71200400001)(86362001)(478600001)(53546011)(6506007)(6916009)(9686003)(55016002)(2906002)(4326008)(33656002)(15650500001)(186003)(26005); 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: vTRPpZ2S5gba7Zu1/njnw4/7tYo0E7h+tvYy183XYusBzEn1GRHfYkzr9cuScpBoRtbD1bNHfApR1uJSKSZ+BtDsm01uLPTRi4U3ntf+1AgxwZ+Sm30bvQU1nSy3+mpgtQoFNiasunWP2jdkxA73VvLU9JMFQo5Ki3kY79NTWxhLEyim7jpFx6OMGlkQqv8wH47c73swhEZHwbedRNr7v8kwH3EUqFAhRzgehzU6JolNGo9YxvSkRGtvhfpjU96vJabGB0vcZLh/8zBdKLHwgIbCO9qJDwvnS3hkb2gpQ+o2KmsIYS1KioDXnmb8pI30G36DdPhcubDMX3dnxk4PplcXB+cyttRAA2cknCY/TmLtcCjdh17phgWYpi9vAUnFWCUXUFazwLVH03DpxIawydsML7FE75YLBTmU4S73izN1krmE8iI+QCETSrtfi1Bt x-ms-exchange-antispam-messagedata: DBvbnhYnP8Aln5GcU7SOjGc7OW1YRKQbyuyb9e/IPDThmk723fMpc5/MsLgRpzMB+O/ZgaipHNc8o90l+WznmI1UMaHYdEVjAIFmvIgR6lTX6OFho17LF+7Rxyi2VBZrMGMFntVRTK1wq5BhWVa9LVHhFLqEuM4D1q7i9nYTTWR9SrE+XjVVaTjRmX79M/EzSHmupPUVZC5sAe3He+MsLiKdkdR0qvv3CYEiwZFd+SPqyKwT9kjyugzPB7inlIWWwO4CVmgPji7A3Q4FhL3ssEE5VjkHCtKRit+jPp7r91YNwSuz/dvjb0c6K4nm2LyrMWCdSlfQlvFll/ppCZ+lOTvLunZp+UlgqFjsXyuasaKC4J9l6JFtpq/XYzxFSn+Hqo7P7+XrsqnN3za2t7u0zDsfDyIRdX84MisiHUrsISQmDqqPE4cvsP3BlAeV2mr7QJIdSiWFv1OpBqexaXX72qkjimt5ZbKUc48k1w/mGmJdPD5wYU1++51CS5MZYzvpk+8yhy3NaHZaU+Zjss2iL+bV7SPC0f4Pt7oczNg18vBI+gKGVJXSlkTFpALhaD2cOJ9duUGJc/U7QEG01CXi5dNiY2fvohg4sCHqfA4rwEpM2qkJuZ+HqwesxqMm6uqx40ILb0eBzAriE8cswBV707CNwfdK0pl2fhw4tTMvBEAIK2bo/KNvWKXmXSmNvczPX7gYFddENMZPZ2fXB3kx058Epl8NyLQ7IyPvzj3lB984lCoKAJTZiEoindeZCVWGkqY7rNen/nRfeJaqknqjQEN/n7iteuVakxCOH14DIRg= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5007 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT021.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)(346002)(39860400002)(136003)(376002)(46966005)(2906002)(81156014)(53546011)(81166007)(8676002)(6506007)(5660300002)(26005)(8936002)(186003)(478600001)(7696005)(82740400003)(86362001)(4326008)(9686003)(356005)(15650500001)(47076004)(336012)(82310400002)(70586007)(70206006)(54906003)(52536014)(316002)(6862004)(55016002)(33656002); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 4ef81ac0-a042-437d-969e-08d7e9b47bf9 X-Forefront-PRVS: 03853D523D X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lQbtZwK4cWQV7sn1+dKLU7VtGnO+iUZitLZKdIwjb9KHLYvxaZaeasPTzO+RUVuUD8xQ1qrYsR/V2nwB4WO8n3PNS/GvjT3Y2oOcA8YW43548JJjiykXhLqhmZRoyIc2YfhgbxvHFgR8z0YgIDbR48vn8vRFSMlxl1TbWJ6LYehiaisO4x1pzTA/C0QOQw3IVFY3+1rZ/F+aO6IG2HsPPsPCkU4b4p7hvKLnlwq4kDuQPfFczi63UvObuRSSNyfsltpDenblK35lJFAra2T5zz387ysuf0tTATS2+aBSe81p2nJ5vVnv7Z9FGoX2q3eDJc3Nb+yQiBeQUSV73sAqtA03jI5T3GNGdfGhjMs8TwP2olCYDI6z/S5cl4O/Ycb0MillGqHSAdAjk4A8gJwQ/rypT5qcMkUBarIIT0T0JegpdLrOO78Zknd+r6E9yj6QoHKxTQHM6O4/qbBYJxIk97pnc7Se5LtyiYzU6OlvKdlmP1ahmmJsemVZk/zOWrkh7ZTAPbxazN/vfmpv8Mfo4A== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2020 07:36:14.7715 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1d1c6600-8988-4063-9085-08d7e9b4800a 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: AM6PR08MB3351 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: 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 status up= date >=20 > 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. */ >=20 > Unfortunately, I cannot merge this patch because it breaks the ABI: >=20 > [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' changed: > entity changed from 'volatile rte_timer_status' to 'union > rte_timer_status' at rte_timer.h:67:1 > type size hasn't changed >=20 I think we can revert it to the original definition of rte_timer and keep t= he union rte_timer_status volatile-qualified.=20 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