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 830ECA034F; Wed, 6 May 2020 12:20:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 165591D737; Wed, 6 May 2020 12:20:53 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2086.outbound.protection.outlook.com [40.107.20.86]) by dpdk.org (Postfix) with ESMTP id 90E321D6E5 for ; Wed, 6 May 2020 12:20:51 +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=6BANyYc8LHSAG5ArLTVXfU5HQHJIdGm/PaARLd3GQUc=; b=LzGbJ0CS4+q/vr7aZu+LOQL/64CU+vXK6+8j0zWEGFI8t/QahLrUh6NXjYCk0mNgm8r+4IGtXUu1u4qAnWjMMcLdTFj9rYcDSMFFnb2o95bpDPaRHFnI7wzLUecQQe5fKlFgSWdFIuI3g3n9upmrbTPsakoZzY77ujdROTLXNos= Received: from AM6P194CA0082.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:8f::23) by DB7PR08MB3242.eurprd08.prod.outlook.com (2603:10a6:5:1a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.21; Wed, 6 May 2020 10:20:50 +0000 Received: from AM5EUR03FT026.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8f:cafe::3f) by AM6P194CA0082.outlook.office365.com (2603:10a6:209:8f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26 via Frontend Transport; Wed, 6 May 2020 10:20:50 +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 AM5EUR03FT026.mail.protection.outlook.com (10.152.16.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.27 via Frontend Transport; Wed, 6 May 2020 10:20:49 +0000 Received: ("Tessian outbound 4cdf5642225a:v54"); Wed, 06 May 2020 10:20:49 +0000 X-CR-MTA-TID: 64aa7808 Received: from bd9bd941c656.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6C0FBF0D-F043-4BCC-B565-01210CBB9B72.1; Wed, 06 May 2020 10:20:44 +0000 Received: from FRA01-PR2-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id bd9bd941c656.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 06 May 2020 10:20:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hg0tmQJNxJjMGrh6ttW7r14u0/VRt/qEqvoVIxaVGOZPg1HFi/KXURCBMr1cYTxV16FQwZNzjVAD/2FefBl2amIlgpmNy/aEyJfudBzqRum3qgfkObweJlHJ+gQ1vA8nM528D96hDImybncdteV2m+8WSoVoHyw12t3aQcLIo5CIuiYN34MmWxCgeOURZbfji0g8ZWNQjGAQiAQnYg4PgmnDtN41oWknGgq7/shVWblZHIQuCM7RUnrVB6tvGKSu+Rc9YonM37sV+TPGAVLpZWwOdXkDiR++FR5jE158Lb0NY6WCF8D1uPDfGAQTH/jnaxl34OtSObjWzWUuE2V6WQ== 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=6BANyYc8LHSAG5ArLTVXfU5HQHJIdGm/PaARLd3GQUc=; b=ZaDU0olc6P8VzCtuyLS9TPBn2GQnvuHG+XyEvUtVGliFXlFzbOE1oSYXWPaM1OMXNfknNyutgyNav+Q2MFT3HcW+gsaugXGvHatTdyu0NP4KylviMoC18sKsD0yHmyqPf06NSJ3zo7+FX4JcMYWa8k7fkREzcRX0bY565T+/izpHb1XFRWxElaGYw14IqTRrgu9TAz0c5nOnj6bRBQ0knxsVKRjf2qePCsw2lOFuG+sy5ejTEsSWqxhqHhvZi2CGtqgnT1ILaVKG9JpFOXmF5ecfs1owi1GdDvydAuOdk7d25tw37eLQZYxB80d6rqNLMFXpxyKIP5MpYHV00q68yw== 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=6BANyYc8LHSAG5ArLTVXfU5HQHJIdGm/PaARLd3GQUc=; b=LzGbJ0CS4+q/vr7aZu+LOQL/64CU+vXK6+8j0zWEGFI8t/QahLrUh6NXjYCk0mNgm8r+4IGtXUu1u4qAnWjMMcLdTFj9rYcDSMFFnb2o95bpDPaRHFnI7wzLUecQQe5fKlFgSWdFIuI3g3n9upmrbTPsakoZzY77ujdROTLXNos= Received: from PR2PR08MB4635.eurprd08.prod.outlook.com (2603:10a6:101:18::23) by PR2PR08MB4732.eurprd08.prod.outlook.com (2603:10a6:101:26::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.29; Wed, 6 May 2020 10:20:41 +0000 Received: from PR2PR08MB4635.eurprd08.prod.outlook.com ([fe80::35ba:7387:d7c1:6bb9]) by PR2PR08MB4635.eurprd08.prod.outlook.com ([fe80::35ba:7387:d7c1:6bb9%5]) with mapi id 15.20.2958.030; Wed, 6 May 2020 10:20:41 +0000 From: Phil Yang To: Honnappa Nagarahalli , "dev@dpdk.org" , "harry.van.haaren@intel.com" CC: "thomas@monjalon.net" , "david.marchand@redhat.com" , "konstantin.ananyev@intel.com" , "jerinj@marvell.com" , "hemant.agrawal@nxp.com" , "gage.eads@intel.com" , "bruce.richardson@intel.com" , Honnappa Nagarahalli , nd , nd Thread-Topic: [PATCH v4 5/6] service: optimize with c11 atomics Thread-Index: AQHWIyKt+kWuk4B7702zjxzZ0yd4Nqia2MWQ Date: Wed, 6 May 2020 10:20:40 +0000 Message-ID: References: <1587659482-27133-1-git-send-email-phil.yang@arm.com> <20200505211732.25291-1-honnappa.nagarahalli@arm.com> <20200505211732.25291-6-honnappa.nagarahalli@arm.com> In-Reply-To: <20200505211732.25291-6-honnappa.nagarahalli@arm.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: ddac55f7-0bc0-43ed-a2c2-2bf8729a7053.0 x-checkrecipientchecked: true Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=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: e06ba4bb-76fb-4865-effd-08d7f1a7260a x-ms-traffictypediagnostic: PR2PR08MB4732:|PR2PR08MB4732:|DB7PR08MB3242: 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:6108;OLM:6108; x-forefront-prvs: 03950F25EC X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ipVikn1alRG1SutZuwC+wfawrZLTFp2dJQSYueGiI4ZwvZyE7lJmSYPl3VgoaJxDoGEQH1FicjIDECsi0DNmqfT4DiI21A/YR5DjYiQectPhhP4dgZ4NrmeuyDYOLaZzc4/j907Z+9UIqbFUP8Igpcx+D86MMh3g7DcoUgSwUIiAXX8Iv6Axgo0PNyhkU//NzWSZfErpdSCm6OebtXASAxZOANWe/rddKVW7ny6eefYwpq1Z3ghI66zplIXbqFSOesWktwQvIAHNIUbI+8NKMxUN9Uvi5o+i66exsVJ0vQZFjGE2Mmrn6er2KKiAfRaJ6tBy0WI7u8Rn+uHVz/HYjPN6kgU7S+Tnpp7ZGc7vPGE5iss4WfmxozghP0kMsdFhzuixVX4cu/oH/9gVd35d6RA3RrJR+gkoaAn9xbezW6vpIaSXjU931oIhCH/jtFc4dokZLJwbwuGkb+3HX6aDeReGY/LSiCGxqXy5Fwv2eolMEzCEwjZ7x9HPt/azONKW5WvGo9YOEvRhQPGhFNeghg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR2PR08MB4635.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(396003)(366004)(136003)(346002)(376002)(33430700001)(8676002)(66946007)(76116006)(66556008)(2906002)(66476007)(64756008)(9686003)(55016002)(66446008)(5660300002)(71200400001)(186003)(86362001)(26005)(4326008)(110136005)(6506007)(54906003)(33656002)(478600001)(55236004)(7696005)(33440700001)(8936002)(53546011)(52536014)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: ZCRjLPar68HdHZlhiHlTf7ZYWJdhWNc+Ojcfod0iVYsgGBUcmVdO3wxk04e7ENNXLTkQZ69n7x5t09vEKaj339X3/q54rcFH5TP1TgR9Y5S+JtWh0t+CjPZaKhW9fWpQBC+UWztjRPK5LBb4U13AmZ3Wk2N06kgTIiNtdUXokcml7qRxae39ovMcrXUT1zwHzVHbv44nvPJcSAW3JS6bsp9z4gevNWpKOKcup7KyRZCo0nibncqCjo62ImMfx4QeRT8cvVK18V2gxKKwoAgA51z7uYFUAE9e55zqBYRLpBC/yxr8CW7UqlwsTWhgUxC3eEqeiIipx+LOh01S3oucNSRj8tg5pSNBzD0ekBwF5rOcSTYBnPrRZjLZa5ae0kXd+sgTBOP0bJGz5VTulnDNNLs/Gm1wXvuX1/GffRkfmAorwAwBtc/xWuulsQ6kiKfy2580EUy3MS+LXAYvBKQt13pyUcNw7odwHT1EB/BBj9bKEdslk1A2LA79msOtl4dxp5IRZP5kj5gIeg7zC8Xy+LSETmbkst4+4HtXWGg7J9yYnPmllupLrUNv2bbj/WMFaVpAorkQ2XEJrdGBjZF8e2z0jWJ8jtJQzYkGhDUp+tZW7Eiopmc02vA4E41Qq7cNxYvJMEvTJzskQcGRHTobJ4Ux/BRmlFQosXRH8gb/C4rg+ep0wDSulZhqxrq4JQsmAerlidzn4nHUZmRdDW21Gu7/GiaRJeHf8n4Otc/Pf8pGAOkvhkc0LRT0zYR3zNy1QSII2vrS7dDZ1UmZr2zYwP/fre2lB160+H1E+SpPXd4= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4732 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT026.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)(39860400002)(136003)(396003)(346002)(376002)(46966005)(33430700001)(336012)(52536014)(356005)(81166007)(86362001)(9686003)(4326008)(186003)(82310400002)(33656002)(7696005)(70206006)(478600001)(70586007)(82740400003)(8936002)(8676002)(36906005)(54906003)(53546011)(5660300002)(47076004)(33440700001)(55016002)(6506007)(2906002)(26005)(316002)(110136005); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 8a3cf208-6368-46e6-e9e7-08d7f1a720ec X-Forefront-PRVS: 03950F25EC X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T30nLbs38zBaO0kz8aoABheN5flOsiyCyU18/J4clFwFBfEhhBBCYmW7gZK3fkkzSfa2fuvEXN//OgyZGsVVb65T5iJFbB8E9zmbqCvcAciSiRCx+fVctGs9sdDXv3MHPVZsSO6ziJzp+0CGvAdkA8vtattlC2Y8LKAc2+vOpUndyRJI6f9eZFN3FSlZ0XS+J9VPVBUxNii7JQCkpnqg6P1EIF+gJQQDFmblnq7NkYVZkpLa0s0G8CNCycb8dJV67hor0qgP8EUu8wGzLEN+MiRqnt0ca7Ww03DD1paXtb4FkM6GakRzTKMJbqRxQ9Dk/+PA/qU1tfL0Icy5IRq2XP1gxrw5x/wAFQWBTdlmtQ0ONUg+x0cB0yuXj56sqZaOLVVvRNSLjVvzziRtYBUgUDQTvXJf7dGiRyeSzwS77jh+2spzG54Aj94chYajOUecuSlB33ujAZGvQQqPGcnMytCoknQaKbb0uoKbaRxTRFKG5YKoXiC4jBjlGYGqPZ/D50uiAAdZJuKqj7oIK+gCdNK9O1an64BrpAe4DivpbIS/hkX6sZ6qLorinOtwA0o9cLQbMWP/8NI75BCdxqVqXQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2020 10:20:49.5723 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e06ba4bb-76fb-4865-effd-08d7f1a7260a 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: DB7PR08MB3242 Subject: Re: [dpdk-dev] [PATCH v4 5/6] service: optimize with c11 atomics 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: Honnappa Nagarahalli > Sent: Wednesday, May 6, 2020 5:18 AM > To: dev@dpdk.org; Phil Yang ; > harry.van.haaren@intel.com > Cc: thomas@monjalon.net; david.marchand@redhat.com; > konstantin.ananyev@intel.com; jerinj@marvell.com; > hemant.agrawal@nxp.com; gage.eads@intel.com; > bruce.richardson@intel.com; Honnappa Nagarahalli > ; nd > Subject: [PATCH v4 5/6] service: optimize with c11 atomics >=20 > From: Phil Yang >=20 > The num_mapped_cores is used as a statistics. Use c11 atomics with > RELAXED ordering for num_mapped_cores instead of rte_atomic ops which > enforce unnessary barriers on aarch64. >=20 > Replace execute_lock operations to spinlock_try_lock to avoid duplicate > code. >=20 > Signed-off-by: Phil Yang > Reviewed-by: Honnappa Nagarahalli > Acked-by: Harry van Haaren > --- > lib/librte_eal/common/rte_service.c | 32 ++++++++++++++++------------- > lib/librte_eal/meson.build | 4 ++++ > 2 files changed, 22 insertions(+), 14 deletions(-) >=20 > diff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build > index 0267c3b9d..c2d7a6954 100644 > --- a/lib/librte_eal/meson.build > +++ b/lib/librte_eal/meson.build > @@ -21,3 +21,7 @@ endif > if cc.has_header('getopt.h') > cflags +=3D ['-DHAVE_GETOPT_H', '-DHAVE_GETOPT', '- > DHAVE_GETOPT_LONG'] > endif > +# for clang 32-bit compiles we need libatomic for 64-bit atomic ops > +if cc.get_id() =3D=3D 'clang' and dpdk_conf.get('RTE_ARCH_64') =3D=3D fa= lse > + ext_deps +=3D cc.find_library('atomic') > +endif We can remove this as it has been added in global.=20 "da4eae278b56 - build: add global libatomic dependency for 32-bit clang" I've updated it in v5. Thanks, Phil > -- > 2.17.1