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 0320CA0350; Sun, 28 Jun 2020 18:32:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DCA161D15A; Sun, 28 Jun 2020 18:32:14 +0200 (CEST) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10078.outbound.protection.outlook.com [40.107.1.78]) by dpdk.org (Postfix) with ESMTP id 716871D155 for ; Sun, 28 Jun 2020 18:32:13 +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=40s4otEoXfeXoY7eopO8HVSFfilCDItq0YUIPcEmxew=; b=Lt64Mi6toWJolnctcn2s5WSieE8gQscxct7vjIrdLcjNVuLD1VCcadx2BB75LkeIjQhtTQpH2slFyZzsoS10lNEmxbvKXU2mZceTxli6kcAxsInd0upRCAgrfe6jBryJB1mkiEkAUkMW0VfqFnpAc/qCXwbk3XglT44+qbA/r8Q= Received: from DB6PR0201CA0010.eurprd02.prod.outlook.com (2603:10a6:4:3f::20) by DB6PR0801MB2024.eurprd08.prod.outlook.com (2603:10a6:4:74::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20; Sun, 28 Jun 2020 16:32:11 +0000 Received: from DB5EUR03FT024.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3f:cafe::ce) by DB6PR0201CA0010.outlook.office365.com (2603:10a6:4:3f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Sun, 28 Jun 2020 16:32:11 +0000 X-MS-Exchange-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 DB5EUR03FT024.mail.protection.outlook.com (10.152.20.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Sun, 28 Jun 2020 16:32:11 +0000 Received: ("Tessian outbound fcb8da16d5bd:v60"); Sun, 28 Jun 2020 16:32:11 +0000 X-CR-MTA-TID: 64aa7808 Received: from b530730ebe82.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5F2E3677-C205-478C-8AC3-11343D6C4302.1; Sun, 28 Jun 2020 16:32:06 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b530730ebe82.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Sun, 28 Jun 2020 16:32:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DNpmJM3ZSvVZQCMAEqxleWolHKshzFve14NivI6BAq5ZKrrLw80DHm1axH/my1jstnkP+NGvXN+37HjgEd8uFwTCXu819uRB1q/GeeOjXK6Z+MZNdcE+gRRqIB1Y//CgHUCImkc7A4xfkDkEUZOnLUSS1573+nuEG8td/cKbgVWCe8bPnPMPB1m5szdbI3C/c8NjjksmEzDlx9b7ROuGHWJT/wWui4lyOYmpQBLZ5znYMVGSigTXCz+1kKaoxwJd/IPI4AF9K3PeZGVgC0DFXBR8y7jCeyEA8BHGHJ98tox7Fq0HUrUfa4xIyoNIUQS9LLPcpb1enCnYC4OoKbmNsw== 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=40s4otEoXfeXoY7eopO8HVSFfilCDItq0YUIPcEmxew=; b=mZmPRbBKSuN89bphCSh+/ThB2v8M4zljlRBW6Dv4QQcznupj9nPax4r5Zu2QuyYFua0hBSqS8lxKFhhZZLo4eRYU9G3XPfe0yvpaEXVwO+H7rIQfcpkPHhAqBuXsQlW4w2L9qzJecUzjT7rYSD5YwUU1oCDWv9/5zt8JSu6qChRqB6n08dCsPQW6QtHRzLgkr1glIOgZKjwybETH7yJQ1bhCWlmVIHxTEqmSjAlgdoIBT0o8bMwCRx+uNb/XsAN+GH/J8SFeVmYsd0y6u/QoqCFMDs284AyYQlTzg68sEiaCTeqrtpSuqSkOwVsOVSZC+r6q7j7ZDZ62DyU6n+sJXw== 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=40s4otEoXfeXoY7eopO8HVSFfilCDItq0YUIPcEmxew=; b=Lt64Mi6toWJolnctcn2s5WSieE8gQscxct7vjIrdLcjNVuLD1VCcadx2BB75LkeIjQhtTQpH2slFyZzsoS10lNEmxbvKXU2mZceTxli6kcAxsInd0upRCAgrfe6jBryJB1mkiEkAUkMW0VfqFnpAc/qCXwbk3XglT44+qbA/r8Q= Received: from VE1PR08MB4640.eurprd08.prod.outlook.com (2603:10a6:802:b2::11) by VI1PR08MB3294.eurprd08.prod.outlook.com (2603:10a6:803:3f::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.23; Sun, 28 Jun 2020 16:32:04 +0000 Received: from VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::c2e:9ccb:a690:6863]) by VE1PR08MB4640.eurprd08.prod.outlook.com ([fe80::c2e:9ccb:a690:6863%6]) with mapi id 15.20.3131.026; Sun, 28 Jun 2020 16:32:04 +0000 From: Phil Yang To: "Carrillo, Erik G" , Stephen Hemminger CC: "dev@dpdk.org" , "drc@linux.vnet.ibm.com" , Honnappa Nagarahalli , Ruifeng Wang , Dharmik Thakkar , nd Thread-Topic: [dpdk-dev] [PATCH 2/3] eventdev: use c11 atomics for lcore timer armed flag Thread-Index: AQHWSaQvZrYKRdOL5EigE047ro5SMajmuAmAgAeCkRA= Date: Sun, 28 Jun 2020 16:32:04 +0000 Message-ID: References: <1591960798-24024-1-git-send-email-phil.yang@arm.com> <1591960798-24024-2-git-send-email-phil.yang@arm.com> <20200623142002.6b997568@hermes.lan> 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: d848b974-6465-4db1-933d-f0a582156375.0 x-checkrecipientchecked: true Authentication-Results-Original: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [180.162.1.103] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8dd42a7b-e47a-460f-2708-08d81b80cf14 x-ms-traffictypediagnostic: VI1PR08MB3294:|DB6PR0801MB2024: 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: 0448A97BF2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: SfGvi50+4vbYk45qCUAAkQpFrfngJDxCfp6EGOv4Pfv72jjLTcgROxjg6IDINZn+Mzv5OaskpLZW+0UScMUs9s/5g4QF0M9dRJ1zg8C4o+W4/DFiGwiQkzuhUw7o9Kdz7PRE7eCYNfaKuPPbGzHsrLGavIi12DGX5NZaFLs6z10IYKlFKf2v7yfJQJwNVQidRBQTnPq+yik0veQ6pLKDCB2mtyoNBbCum39g+IKiaRqV6HR66wunPZ01vFoAyPl4tK0JBr+/U99t/BZHl5mMoqrQQnxCaSfxO+yVOrzo1qzBo+g+1q5ysDn9x+9Vp1fd+DH9jumL5/P2YjrErAUh1w== 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)(396003)(366004)(39850400004)(346002)(136003)(376002)(8676002)(83380400001)(86362001)(9686003)(2906002)(478600001)(5660300002)(26005)(53546011)(6506007)(55016002)(186003)(8936002)(71200400001)(66556008)(316002)(66476007)(33656002)(7696005)(76116006)(54906003)(110136005)(4326008)(64756008)(66946007)(66446008)(52536014); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: re/C4WsUtjrlNQVinysbUNXdUiXl++cp5QS8a743KghbPNUBGP4UfAH85dKwVyVEaa/oRnQ/lC9x48A+tzIVYTOhWf3+/nujjhHQtuBKVnolk0zsaqmpmsOo7Vh+t2aKr1/At3UggW/07mM7NkPa3cxoeZno+XBEg7hXkHTw6LYb3uYs9cjF8HkFmQIKWlAwYXTNV8vskT55PyCrH77H/AooayGvwBcL31H2oqTgNFM+yB/VVrb2TCjU9PgGNLsKRJFHzk1h6N4Zzee21zOQmI8hpZA/28Go2VSIgo15OMwMjKUIWcVuZydGhNxaw8FprAD4aZp+km3ifcTkemjh2CwaElhiMlcMrcqcNo0sdC46kZSH3R9FVH8hQZscWV3OI8ilFV+UHWZ10nOA+1dfuyfewSWL3jgwJn+TeUiwBjDERvI09INCxL3nohWRY/fFGgScxh/4BbXUvEJ+az44/0w5FOy0kfqwM3QLk/ccINk= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3294 Original-Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT024.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)(39850400004)(136003)(346002)(376002)(46966005)(186003)(70586007)(86362001)(81166007)(7696005)(47076004)(6506007)(4326008)(54906003)(110136005)(53546011)(478600001)(82740400003)(26005)(316002)(336012)(82310400002)(55016002)(8676002)(9686003)(8936002)(2906002)(33656002)(5660300002)(52536014)(70206006)(83380400001)(356005); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 0f936081-782f-45ce-e24d-08d81b80cabb X-Forefront-PRVS: 0448A97BF2 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /cyg7hlvhpgzjOrl5qCkmLayMRgjXA7GQGLTUYB5pn2iJ+Ob5v62nPBYjydzwGpBKkZOeeoj2gcHITtU/mqMGpkwisBV0BawzkpTu+D6d81wMluHI8Iq+pBteJb9bT34QC4N1blrppyecmf4lfrcXzJiITtkQCpYMkn+yZPUC+AWDaN0LStDBgPrUs7wmf74S/LQnqHwRlPS4I5GTenNWTwSWE4X+e6bXLvCNlyLNOvFPBqvv244APInx34f4zbkjOWOSIRqIk2kKnFSfgcD/vRrEF9Suy49NEIG+hzcenBttQm28diB0VgJT2z+MCMJQLs8mFdpPpBO76uRtJKV/N5F03x8Vt2QzzDqE47Wq/y9sBNyl7poLfELdpeZ4+oU1WVlM1+vejF+1rSn1Mw5cQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2020 16:32:11.6823 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8dd42a7b-e47a-460f-2708-08d81b80cf14 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: DB5EUR03FT024.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2024 Subject: Re: [dpdk-dev] [PATCH 2/3] eventdev: use c11 atomics for lcore timer armed flag 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: Wednesday, June 24, 2020 5:32 AM > To: Stephen Hemminger ; Phil Yang > > Cc: dev@dpdk.org; drc@linux.vnet.ibm.com; Honnappa Nagarahalli > ; Ruifeng Wang > ; Dharmik Thakkar ; > nd > Subject: RE: [dpdk-dev] [PATCH 2/3] eventdev: use c11 atomics for lcore > timer armed flag >=20 > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Tuesday, June 23, 2020 4:20 PM > > To: Phil Yang > > Cc: dev@dpdk.org; Carrillo, Erik G ; > > drc@linux.vnet.ibm.com; honnappa.nagarahalli@arm.com; > > ruifeng.wang@arm.com; dharmik.thakkar@arm.com; nd@arm.com > > Subject: Re: [dpdk-dev] [PATCH 2/3] eventdev: use c11 atomics for lcore > > timer armed flag > > > > On Fri, 12 Jun 2020 19:19:57 +0800 > > Phil Yang wrote: > > > > > /* Track which cores have actually armed a timer */ > > > struct { > > > - rte_atomic16_t v; > > > + int16_t v; > > > } __rte_cache_aligned in_use[RTE_MAX_LCORE]; > > > > Do you really need this to be cache aligned (ie one per line)? >=20 > I believe I did this originally to keep a cache line from bouncing when t= wo > different cores are arming timers, so it's not strictly necessary. Yeah, if we remove it, these per core variables might cause a false sharing= issue between threads.=20 That will hurt performance. >=20 > > Why have a signed value for a reference count? Shouldn't it be unsigned= ? Yes. It should be unsigned in the new code.=20 I will update it in the next version. Thanks, Phil