From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 67F62A0C4B; Tue, 9 Nov 2021 06:44:01 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F6AE4068B; Tue, 9 Nov 2021 06:44:01 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140071.outbound.protection.outlook.com [40.107.14.71]) by mails.dpdk.org (Postfix) with ESMTP id D05FF40687 for ; Tue, 9 Nov 2021 06:43:59 +0100 (CET) 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=juKvX7nL0mVWAkndMFGayJryydlJgKa3kqIMInsStYw=; b=cUVh49wO0fEF8OW27gzNOM7jouvynZz7eb1bVdCeyPXG6RZ3me0d7dFEysno5bE0WgdJSi3RyuAFq4apH4ee86aLTICnDBxaMgEyV6QPV7cYSpOnIjx0UbNAP96f9Eux2MsifiJayYgg4c+MdN75gPmBvrKONA45MDbliKt7oMY= Received: from DB6PR0402CA0001.eurprd04.prod.outlook.com (2603:10a6:4:91::11) by AM5PR0801MB1923.eurprd08.prod.outlook.com (2603:10a6:203:4c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Tue, 9 Nov 2021 05:43:56 +0000 Received: from DB5EUR03FT006.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:91:cafe::69) by DB6PR0402CA0001.outlook.office365.com (2603:10a6:4:91::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Tue, 9 Nov 2021 05:43:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass 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 DB5EUR03FT006.mail.protection.outlook.com (10.152.20.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Tue, 9 Nov 2021 05:43:56 +0000 Received: ("Tessian outbound e7ce0d853b63:v108"); Tue, 09 Nov 2021 05:43:56 +0000 X-CR-MTA-TID: 64aa7808 Received: from d8de2132ee7d.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FC44E21B-4046-4B35-BFE6-ED95AFD90DE0.1; Tue, 09 Nov 2021 05:43:46 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d8de2132ee7d.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 09 Nov 2021 05:43:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QoSttDTNFNE6TElMcguIADyzf56zE5gtXvSIRQpbI3EGTkMP6+poZbB03BItQrSM5CgVOIBrnbZZhoH9EOHZya67lCzMIDPQ7+aihiIfrvXLzZWi3T7V7G/ZAesPhNIQruTMDYBm2OKfjp9yNwo5BL2pVsDchMyv9y0VVbyJ+AScyU1xVa3Ldjg+uQ4FvUUesTZ6b/JiCddxir/0qeBESkofLyZrOB22BETmkVxyfZj00Ak0nlZYqNBBHVxJ5uM52p4sb1BV6rQ4soA/z0XnHyG6rnMaRnfHUcbi3+rpvWtGoi7GAjxuqx0+jyt7xoZj7f44LVY17HJ9a3j8s5t1KA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=juKvX7nL0mVWAkndMFGayJryydlJgKa3kqIMInsStYw=; b=by7LJzKektaqwlReV69gVxhqLPn+z2cC+a9dGIoRs3aFnSZjU3lNr0yS7h7pdcTHUT8vr5GheTQNrANacmExzvtclJ54IzD5rTlb7Hwh+TDYwJKXRuueWys3losHNkB/jO13Lognbh+PcKItEQUfNsx0PZmUzc4MTqhImsVclZwZaNQ3meRW+epJhl9xcjZETfhyxT0oOGJwd3MP8UMpZYUYWQVr4CVvVDrV76KFOkLOLrlD2JYx6wh/D2AZiXu3jxKl6acy7L9IVaTZ2Vo2j7IpeVs4ch53ACnqxfbpSNUi6nyRmMPQlmGwSfP9foVEjGDQrkpIYo+z6zKpNN6i9w== 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=juKvX7nL0mVWAkndMFGayJryydlJgKa3kqIMInsStYw=; b=cUVh49wO0fEF8OW27gzNOM7jouvynZz7eb1bVdCeyPXG6RZ3me0d7dFEysno5bE0WgdJSi3RyuAFq4apH4ee86aLTICnDBxaMgEyV6QPV7cYSpOnIjx0UbNAP96f9Eux2MsifiJayYgg4c+MdN75gPmBvrKONA45MDbliKt7oMY= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB8PR08MB5482.eurprd08.prod.outlook.com (2603:10a6:10:116::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Tue, 9 Nov 2021 05:43:44 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::8501:86ca:a393:17b7]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::8501:86ca:a393:17b7%9]) with mapi id 15.20.4690.015; Tue, 9 Nov 2021 05:43:44 +0000 From: Honnappa Nagarahalli To: Joyce Kong , "thomas@monjalon.net" , "david.marchand@redhat.com" , Ruifeng Wang , "konstantin.ananyev@intel.com" , "rsanford@akamai.com" , "erik.g.carrillo@intel.com" , "olivier.matz@6wind.com" , "yipeng1.wang@intel.com" , "sameh.gobriel@intel.com" , "bruce.richardson@intel.com" , "vladimir.medvedkin@intel.com" , "anatoly.burakov@intel.com" , "andrew.rybchenko@oktetlabs.ru" , "jerinj@marvell.com" , "declan.doherty@intel.com" , "ciara.power@intel.com" , "xiaoyun.li@intel.com" , "nicolas.chautru@intel.com" , "maryam.tahhan@intel.com" , "reshma.pattan@intel.com" , "cristian.dumitrescu@intel.com" CC: "dev@dpdk.org" , nd , nd Thread-Topic: [PATCH v1 02/12] test/ring_perf: use compiler atomic builtins for lcores sync Thread-Index: AQHXh4gJkDEPjQsNWESOj0HN3ii78Kv7Shjw Date: Tue, 9 Nov 2021 05:43:44 +0000 Message-ID: References: <20210802101847.3462-1-joyce.kong@arm.com> <20210802101847.3462-3-joyce.kong@arm.com> In-Reply-To: <20210802101847.3462-3-joyce.kong@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 384F5F69333F8543B17151730F3FED3E.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: 2c6c1b11-0c24-47af-d866-08d9a343ebd0 x-ms-traffictypediagnostic: DB8PR08MB5482:|AM5PR0801MB1923: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:2276;OLM:2276; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 12tdGw1KJm2/fQkZSh8zgdnQQKSBa+z84rFWeOX3TcLp79Cm9fTdzmcnT2vuZv1nlNW4pTskloQU4D3yLrkKEBLKHHR1YG0+oPT1HXGXeRXWPBa7tghnMJDNxRDvIi89J7EjajVotCphZ3HzHfIiqS9PL7/JS5aQbRiy9fichSDhOK8NK2ahn/Cg097kJwyp0O+QZO+QArrP9IpwL2WKgEf/qlyIHvIjY6W8bd+uvnYq0ZC/Fooh39+RzSQT9jDOTzhVpAQ6SRaPP8Le8CShK/wAWdWnsl6GmlIqFXOTgfy/7htCf0zooCgGFRznt+0xmZ17b20ilYBNnFXfB36HxeKfwl/O2v/Tgs2U6WVXGPGw6gnfp85iV972TQc2ARaQIM4Hu48BqQH6zKB0cw7D3B2/ffzORqdUJbUt1RwNkpRgzrLRcGrZxybt4NDY0iFcPbKgB7DUenaNZzIe+lNegJ1XOm1YGfkX8LvIM8mKoiIK2y79zZkTLxz1JM2fYO6czkuTWa0CqGomtXzq5V2wRcjFALY+AQH1eQZTXF3uJLjhj9NVMcEnys53rEwWULjK08jZDCQfsmRNJX/eQ4yvDhWcqs8G/cjg0Wcod0WDnL3ytO9eL1/Uz79ep1tqs6C/jB5HVOjq1aclUWKbOn58kPNhT5DuNOWoq1iZSY7Hi0EJBOaYeZVKo5QjYvnravZVwRw1ewci7uLcHhQMCMxMDyhPJ1TlR+cOhYl4q49Kv3o= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(8676002)(66946007)(6506007)(8936002)(110136005)(508600001)(52536014)(71200400001)(4326008)(86362001)(33656002)(9686003)(26005)(55016002)(7696005)(54906003)(66476007)(38100700002)(316002)(76116006)(83380400001)(921005)(64756008)(186003)(5660300002)(7416002)(2906002)(66556008)(38070700005)(122000001)(66446008); DIR:OUT; SFP:1101; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5482 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: cee39ab1-5e6a-4425-78f9-08d9a343e4e1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b6A6qMt8b4H11JJxUrvmFC9b5df7Y6UM0Ar/6CVCe/8WtJCBFoRNBPohmJ7GbrvBtgGca4TU0Y+NCIXNpJ/RAEd7S6SNnvbrb0YIJbVyi1k3SIJiv3lBnXYysQSCUeGwSIDumnddlbvzDnNF16k8jQu+X1MnpR342nmx5GR77wvtM7wc1Fs7yDdFIlL0JwH2MT3QRG1RnRtsH8rVdUNv9vVBR7D8KSaPnwS+sVgFJldXBOpvzif8BJ+5/K/9kPNCOZsOtB37n74i9PGVK8Qikni+a0r5iRtP9ZBmUTy3ffgplSCQKWOBFUKRhTiEUd08W7jpeLnOFOUe07mafMiFOzAvEMI9ngl5XCg0cInUSBtDY+J4Y8z0IMjF7+eIgZv55Vz0QGbZ8e8JETr+NAGwNpKzNQoMAvG7FgoKJLc13BrbirBdTpJDzp7y3oCluMVP5EmOs2EmHc7dCarJSlwaaPkbkWRF2z6h8omlJZ0me3kVelBWIaqpWaQc/FXQwy7l6Kn2O7lMvUOTFmNfHgsjTdu6CTy/q2IgRlaVw4OClZ+Ds/PfezRj6rKrbknvHft/1HxUNIkt1E0om8O+DenTuaZrRk0EDIzGuz10hiSWyUoSQ3BHEKvsKTCrK3ds84hfbqVZbzAqx+couskJn2gw3zTxe+h8lj3sU2M4AkfSaMH9K6J/ztTOrcw9ewouhPICeQhOAGHdcZfckd700QeFVuZvr0aQI2YwFSR42d8DDGQ= 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; SFS:(4636009)(36840700001)(46966006)(81166007)(5660300002)(26005)(8936002)(110136005)(921005)(508600001)(9686003)(47076005)(6506007)(83380400001)(7696005)(36860700001)(356005)(33656002)(82310400003)(186003)(86362001)(8676002)(52536014)(54906003)(55016002)(70586007)(4326008)(70206006)(2906002)(336012)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2021 05:43:56.4044 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2c6c1b11-0c24-47af-d866-08d9a343ebd0 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-AuthSource: DB5EUR03FT006.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1923 Subject: Re: [dpdk-dev] [PATCH v1 02/12] test/ring_perf: use compiler atomic builtins for lcores sync X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" >=20 > Convert rte_atomic usages to compiler atomic built-ins for lcores sync in > ring_perf test cases. >=20 > Signed-off-by: Joyce Kong > Reviewed-by: Ruifeng Wang Looks good. Reviewed-by: Honnappa Nagarahalli > --- > app/test/test_ring_perf.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) >=20 > diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c index > fd82e20412..2d8bb675a3 100644 > --- a/app/test/test_ring_perf.c > +++ b/app/test/test_ring_perf.c > @@ -320,7 +320,7 @@ run_on_core_pair(struct lcore_pair *cores, struct > rte_ring *r, const int esize) > return 0; > } >=20 > -static rte_atomic32_t synchro; > +static uint32_t synchro; > static uint64_t queue_count[RTE_MAX_LCORE]; >=20 > #define TIME_MS 100 > @@ -342,8 +342,7 @@ load_loop_fn_helper(struct thread_params *p, const > int esize) >=20 > /* wait synchro for workers */ > if (lcore !=3D rte_get_main_lcore()) > - while (rte_atomic32_read(&synchro) =3D=3D 0) > - rte_pause(); > + rte_wait_until_equal_32(&synchro, 1, __ATOMIC_RELAXED); >=20 > begin =3D rte_get_timer_cycles(); > while (time_diff < hz * TIME_MS / 1000) { @@ -398,12 +397,12 @@ > run_on_all_cores(struct rte_ring *r, const int esize) > param.r =3D r; >=20 > /* clear synchro and start workers */ > - rte_atomic32_set(&synchro, 0); > + __atomic_store_n(&synchro, 0, __ATOMIC_RELAXED); > if (rte_eal_mp_remote_launch(lcore_f, ¶m, SKIP_MAIN) > < 0) > return -1; >=20 > /* start synchro and launch test on main */ > - rte_atomic32_set(&synchro, 1); > + __atomic_store_n(&synchro, 1, __ATOMIC_RELAXED); > lcore_f(¶m); >=20 > rte_eal_mp_wait_lcore(); > -- > 2.17.1