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 CE3A3A0597; Wed, 8 Apr 2020 12:24:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 61BBA1C11D; Wed, 8 Apr 2020 12:24:04 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60085.outbound.protection.outlook.com [40.107.6.85]) by dpdk.org (Postfix) with ESMTP id 6E8401C11B for ; Wed, 8 Apr 2020 12:24:03 +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=SCYdP8vQjlgmvG6vQIPEPWKEilK1jtwbDKBGODk2pG0=; b=GxD8+2ASvyQutBgrOZ8YDm+DKlg1YfmyWCX8Ocdkqi97WKm5YadbbByyu8szNnVVDAUzXWNUT2RCoFUepfB8M5HVZ/z3/R94KCU0R5yNXZVaowZt3FdsvV7G4jKc4DmuInV/eR/xa/novSEFFk4WgylvE6khqcfGHxMPFoGLRSc= Received: from AM6PR04CA0060.eurprd04.prod.outlook.com (2603:10a6:20b:f0::37) by DB6PR08MB2629.eurprd08.prod.outlook.com (2603:10a6:6:22::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Wed, 8 Apr 2020 10:24:01 +0000 Received: from AM5EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:f0:cafe::65) by AM6PR04CA0060.outlook.office365.com (2603:10a6:20b:f0::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Wed, 8 Apr 2020 10:24:01 +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 AM5EUR03FT054.mail.protection.outlook.com (10.152.16.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.17 via Frontend Transport; Wed, 8 Apr 2020 10:24:00 +0000 Received: ("Tessian outbound 5345ff401cf8:v50"); Wed, 08 Apr 2020 10:24:00 +0000 X-CR-MTA-TID: 64aa7808 Received: from 9736ea6f231b.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id BCB6629E-9453-4190-AE1C-15E33D431E0D.1; Wed, 08 Apr 2020 10:23:55 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9736ea6f231b.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Apr 2020 10:23:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PlPONIe11FBik4RmJH7TN9j7twM3p/j6ZAOaheSIGWK8YKspDEw7HzBm7POug00HiELRuWHyiAJp1gpOfF/Z5DpP3q9nCdDnTYc5zhlgKEmNjVJ+kn6Dp8aPiaI6ekPj19br3agtZMzGnQ48sNLGizteJhZ/561c/kU8LfaZ8MP7eqUZBzisigRM7barTDnZPfHT8RrtzO6sLvy7sDKzgZ2WmweJyEzDbJn7Wbrj/W+dSByS6HQR3DmWD8N3i1Ha8+w1oP1Ro+W4hzMOrmxIXkjPHZ+upudAYVdJb/rPzMFx8Ub5w6eiiaQuziAOBLT/CfCrbFDbUSRjXRlzX+8AKg== 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=SCYdP8vQjlgmvG6vQIPEPWKEilK1jtwbDKBGODk2pG0=; b=M2cxDN5fzn19AfnpXuTLRNRdAzrKVRKJwsWxTdF5wco/GlCdWnRnvwtgj6varQKucEMnrkyfIS1mECfoxdHth7tCVx8NiTQGQ/1onMCTjPPRDvKC+fuWfWSAa8MBeNZIE4/KjxQn7yAGJlfRDaDjSxhtZ8/2jhL9CyJgXLwh3leuKIWtTsQT9AItWl6om72fgUPpcbXuxYDJ85vU7Hvl1sb7anoANQZrLys6w47VlIM8hJVWOKOIFiiXNq4k8HqQQeb8G1Ub0Cyma4iHk2SSp28rAtkNboNRorJiUzAbh46dNjphHic1Eo/oROQbmAGlrf3DYSdmQa43sda6QXUurg== 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=SCYdP8vQjlgmvG6vQIPEPWKEilK1jtwbDKBGODk2pG0=; b=GxD8+2ASvyQutBgrOZ8YDm+DKlg1YfmyWCX8Ocdkqi97WKm5YadbbByyu8szNnVVDAUzXWNUT2RCoFUepfB8M5HVZ/z3/R94KCU0R5yNXZVaowZt3FdsvV7G4jKc4DmuInV/eR/xa/novSEFFk4WgylvE6khqcfGHxMPFoGLRSc= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (10.255.27.75) by VE1PR08MB4719.eurprd08.prod.outlook.com (10.255.113.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.16; Wed, 8 Apr 2020 10:23:54 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::7df3:e3c8:54f7:57c2]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::7df3:e3c8:54f7:57c2%6]) with mapi id 15.20.2878.021; Wed, 8 Apr 2020 10:23:54 +0000 From: Phil Yang To: Phil Yang , "rsanford@akamai.com" , "erik.g.carrillo@intel.com" , "dev@dpdk.org" CC: "david.marchand@redhat.com" , "anatoly.burakov@intel.com" , "thomas@monjalon.net" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , Honnappa Nagarahalli , Gavin Hu , nd , nd Thread-Topic: [PATCH 2/2] lib/timer: relax barrier for status update Thread-Index: AQHV6t2eFNsTow5NnU2kr/yq0gxiTahvSQeg Date: Wed, 8 Apr 2020 10:23:53 +0000 Message-ID: References: <1582526539-14360-1-git-send-email-phil.yang@arm.com> <1582526539-14360-2-git-send-email-phil.yang@arm.com> In-Reply-To: <1582526539-14360-2-git-send-email-phil.yang@arm.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 7f9b8ff6-45a0-420b-acb1-42bb7f18c6ba.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: 7f4a871b-678f-4859-43bd-08d7dba6f489 x-ms-traffictypediagnostic: VE1PR08MB4719:|VE1PR08MB4719:|DB6PR08MB2629: 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:7691;OLM:7691; x-forefront-prvs: 0367A50BB1 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:(10009020)(4636009)(366004)(39860400002)(136003)(346002)(396003)(376002)(86362001)(71200400001)(478600001)(6506007)(8936002)(316002)(186003)(81156014)(8676002)(26005)(53546011)(2906002)(76116006)(7696005)(66476007)(52536014)(4326008)(54906003)(5660300002)(15650500001)(33656002)(66556008)(66946007)(81166007)(64756008)(55016002)(110136005)(66446008)(9686003); 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: yrgBCCgqSzGM4N/vXykpOuSE+ohQSZ9JJZUE4cRHh34mMpUB9jDPcXnXUJ4BYuwhxfrD0LwAlcaIvioEODes4nRL61TouOa3UGXy4tOn22akQwKgaw79KHcwayUCuwD3wDQzQBK3Krkp0iU3sMELULHAP+8Pkxr/kFrcD0glcByN4IGMA343WGhu2HqlMMvu9Hrtu7Fm1GK0dR7SNn6zfkk9yweNuVxP065cfsIAYzyuDAI4/QvQiklFwvXvdN/RktWBqrC4/uy2DjA1K30zIerOWrEyQMzy4QDH7GDNU/qIZTIeX84fFYR2OMg4tDB5Kly9u/wuyaXDu8tdpVPyisbaB/848DGbKYZ9zlxUnIerhRzzb+s2jRvEFaFuwOpS5ww377WLJUZ/PmYZXjV0+4CUFrHszDFKGAmbfBN7zEQWzIIsdhxUcXauFqV912uY x-ms-exchange-antispam-messagedata: GShyFiJcVMyWVMcXCEvQBIjI94eJG9pkYvR1cJVqCF5m05LY9y0wEX8kQziCLpiMrCyadEPXU9ryWUsC5tVj/G4QYmNqsCHs7SM+MPyiejqPa0huP9Ip3UoyAa6BHM8z5N9OrAJ1RdIL2p7aRZnNOw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4719 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Phil.Yang@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT054.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:(10009020)(4636009)(46966005)(36906005)(81156014)(110136005)(15650500001)(47076004)(6506007)(53546011)(8676002)(54906003)(186003)(8936002)(70586007)(26826003)(26005)(70206006)(5660300002)(86362001)(9686003)(2906002)(81166007)(336012)(498600001)(55016002)(356004)(4326008)(52536014)(33656002)(7696005); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 62bac5cb-bec4-489b-ba4f-08d7dba6f062 X-Forefront-PRVS: 0367A50BB1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 93jq8Gb9QukDYb7e2uGWofnka5/WD5DOsuEGz/+VWHVx/PGz8Z30H6IKm1LKg4/gygacVHlTc1PA3C4UeN5N5Uuk4t3pCkVfcRDTscmcQZo+Yso59ZdpFlB463/h5RlPbWuv0dlVVWXmbAytZbwYOE+mlAFUq8cl3kB0FxrXblRSgsb/gWIC8jQKnMsUiomO1UMzEwZQCstvzLSS/vlQHLrSw6BSOXkXUx/BzXf5qw3t262ZUsbkfFBVd2bE/xxXzcwCqOALguFohDeNstvWy1hXnc9KMZ8oMOtET4TKjV7fW5UgMj9mUIp86BmtUv4cn1iCnFcN6P+/9A0KwjhVVTEF5Qjvvyfo/5bGSz5Q/KrQZfaMC4rcSCSujiVQI3V6+phau9n4rYVv7w5uH3VyX8JOcHSNe6uy6boFQmL1jamq1SqvSF5+fSkBx0N3yJJM6Uqp5jXeyo34fLlf6zXKrwTtrA6C90XUiETSyzTcZ2h3Z+4IjuTUggQDC1gf2jFdcNgzD+ZKOiZvSwnGAZK3mA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 10:24:00.9214 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7f4a871b-678f-4859-43bd-08d7dba6f489 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: DB6PR08MB2629 Subject: Re: [dpdk-dev] [PATCH 2/2] 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: Phil Yang > Sent: Monday, February 24, 2020 2:42 PM > To: rsanford@akamai.com; erik.g.carrillo@intel.com; dev@dpdk.org > Cc: david.marchand@redhat.com; anatoly.burakov@intel.com; > thomas@monjalon.net; jerinj@marvell.com; hemant.agrawal@nxp.com; > Honnappa Nagarahalli ; Gavin Hu > ; Phil Yang ; nd > Subject: [PATCH 2/2] lib/timer: relax barrier for status update >=20 > 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. >=20 > 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. >=20 > Suggested-by: Honnappa Nagarahalli > Signed-off-by: Phil Yang > Reviewed-by: Gavin Hu > --- > lib/librte_timer/rte_timer.c | 90 +++++++++++++++++++++++++++++++---- Ping.=20 Thanks, Phil