From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-eopbgr810044.outbound.protection.outlook.com [40.107.81.44]) by dpdk.org (Postfix) with ESMTP id 4C3FD239 for ; Sun, 11 Nov 2018 08:48:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r+6zibnTIosYU+U9/w5C6MzYbHyxvRCxJHeVFiZ+X7Q=; b=l1XfNQnCd345W/mHGsgo4iU6/6q1gMO2rmKF83vCXeMdJmwKsD2/0hawOQRDGpgKflIdYszUg1Vj1fqndKxUUNpPCBi9GjjiFLys7PRtJRPbGX7Lfk3nt+UQiBpueHR8KulfM9L73Wub4Pct8JD6AyaUIui4bPJ9JHr699LtWSM= Received: from SN6PR07MB5008.namprd07.prod.outlook.com (52.135.121.74) by SN6PR07MB5424.namprd07.prod.outlook.com (52.135.120.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.26; Sun, 11 Nov 2018 07:48:22 +0000 Received: from SN6PR07MB5008.namprd07.prod.outlook.com ([fe80::913d:1a21:cb40:16de]) by SN6PR07MB5008.namprd07.prod.outlook.com ([fe80::913d:1a21:cb40:16de%3]) with mapi id 15.20.1294.044; Sun, 11 Nov 2018 07:48:22 +0000 From: Jerin Jacob To: Honnappa Nagarahalli CC: "bruce.richardson@intel.com" , "pablo.de.lara.guarch@intel.com" , "dev@dpdk.org" , "hemant.agrawal@nxp.com" , "chaozhu@linux.vnet.ibm.com" , "yipeng1.wang@intel.com" , "dharmik.thakkar@arm.com" , "gavin.hu@arm.com" , "nd@arm.com" , "thomas@monjalon.net" , "Kapoor, Prasun" Thread-Topic: [PATCH v2 1/1] hash: separate lf and rw lock lookup code paths Thread-Index: AQHUeScMLJxqxL0alEGIuNTqEzvUXaVKM3cA Date: Sun, 11 Nov 2018 07:48:22 +0000 Message-ID: <20181111074805.GA3496@jerin> References: <20181109163917.16845-1-honnappa.nagarahalli@arm.com> <20181110185534.5444-1-honnappa.nagarahalli@arm.com> <20181110185534.5444-2-honnappa.nagarahalli@arm.com> In-Reply-To: <20181110185534.5444-2-honnappa.nagarahalli@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [115.113.156.3] x-clientproxiedby: BM1PR0101CA0014.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::24) To SN6PR07MB5008.namprd07.prod.outlook.com (2603:10b6:805:ad::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; SN6PR07MB5424; 6:KyznIjahClcIaHDE5y9jRF3s+sufpgWBdf8chqIpqHWXgxknbVkis5nUztlPhJytYTWNyilArMYYHSNmQUQgwM5SlRUAdXavWsCIBgqUUpRTf0Ua64NZlC8deDN8uaxvimQV7fkGgDLFPOZWbSIpEMfZ2p+X9eWpWZnaz2yJfO/aBcF9wXLtMpreVqBldVjOH1KXgAtP5ft18ainR9WVa17sBuPlOufGjp5jLyDo2WVWpNyVQ/NHz5b3ydbVgNxYL/hi8GZNwPCayfVaKMJ8Epfpehv8HPn01xaaSxxIbTu+8AzjR2Uz5M42NHbUrZ3fgcSpbri+df1PENPh218UHABTyox2ztrZC/X/El40/ItmMP09CoMVLRaEgq93EU2ig15tyqi1RhaHuA3lz4yZmRHv8T7y5G2vJbVbQxQV4/H9Uy9YkA9CHJJAw0arZeyAmAzfXiWjDnxTn4SSxMR/Pg==; 5:ZNejNAjy1sVbAE+7imdFBqMHd5fWmgHfYo19gXoIk7KkWhyHhLl36+3cUL6neh0plsBalvUwto1cHydd84XWGjJU25V6kBNSbQxPh9twt4z14XI3KFb/f4b5qKJ1jIU8h1IjpaYVDCv+mx8TXwIao3do6DPQvTEsJ+ZnwpX27L4=; 7:caCDCKBEPqQrZvdw98bILPQSbSSZPRqlP8zB1fNdGMFCdicuxHj/5Kjmq/JfNnE3MCmMOW680mXqq+nk6ibzzMp2gdE0VoHzmK9oG5zfaZrla6id7JIjImj3ddfXOUAHCZq2QFxeVAML3okNm740rg== x-ms-office365-filtering-correlation-id: 57f16f49-fc19-4e05-797b-08d647aa0da0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390040)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:SN6PR07MB5424; x-ms-traffictypediagnostic: SN6PR07MB5424: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699)(185117386973197)(104084551191319)(180628864354917); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231382)(944501410)(52105112)(93006095)(3002001)(10201501046)(148016)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:SN6PR07MB5424; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB5424; x-forefront-prvs: 08534B37A7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(7916004)(39860400002)(366004)(376002)(136003)(396003)(346002)(189003)(199004)(13464003)(26005)(6506007)(102836004)(33716001)(25786009)(55236004)(478600001)(68736007)(4326008)(386003)(446003)(42882007)(33896004)(186003)(11346002)(66066001)(476003)(3846002)(7736002)(1076002)(71200400001)(2900100001)(7416002)(81156014)(6116002)(305945005)(71190400001)(6916009)(81166006)(8936002)(2906002)(229853002)(33656002)(256004)(106356001)(53936002)(316002)(8676002)(14454004)(54906003)(14444005)(486006)(5660300001)(97736004)(52116002)(9686003)(76176011)(99286004)(6486002)(6512007)(107886003)(105586002)(72206003)(6436002)(6246003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB5424; H:SN6PR07MB5008.namprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 4cZV8zvQZQpGJtpqHhzl4ptIlZT44auNWX1FXfyD9YjRoj12QCtSy88aQKJZz1LstF98dwXCR+L0IG01fU/0m/UoOlKfDnaWanzm+4IIUvbaqs8kdw5vioAvMp9CBGJtcoqmawXjQnrG522RELr8Ht2cRH4Zu70NPiVRWvpiIkCJKKjrvtreJOKr/9y9eCeUaB3jzh3mr0W7itCiTR/UY7CNauLsT1ZIz5F6jVSd1fgr/mjPXyYNOeJBByWGoKoqG+7SpCLiWspr+OPEuyaD6+f9NYpQJvZxAV5GhWObQVM479NNubwGj7A7NJbJaISKXk+ZCnHALHCuBey0k3w3B6u0G8vMw6F36KTkr4AZ+nI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-ID: <4561133BD8EC2742900EF5AEC265D030@namprd07.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57f16f49-fc19-4e05-797b-08d647aa0da0 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2018 07:48:22.3780 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB5424 Subject: Re: [dpdk-dev] [PATCH v2 1/1] hash: separate lf and rw lock lookup code paths 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: , X-List-Received-Date: Sun, 11 Nov 2018 07:48:25 -0000 -----Original Message----- > Date: Sat, 10 Nov 2018 12:55:34 -0600 > From: Honnappa Nagarahalli > To: bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com > CC: dev@dpdk.org, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, > chaozhu@linux.vnet.ibm.com, yipeng1.wang@intel.com, > dharmik.thakkar@arm.com, gavin.hu@arm.com, honnappa.nagarahalli@arm.com, > nd@arm.com > Subject: [PATCH v2 1/1] hash: separate lf and rw lock lookup code paths > X-Mailer: git-send-email 2.17.1 >=20 >=20 > The lock-free algorithm has caused significant lookup > performance regression for certain use cases. The > regression is attributed to the use of non-relaxed > memory orderings. 2 versions of the lookup functions > are created. One that uses the RW lock and the one that > is lock-free. This restores the performance regression > caused for use cases that used RW lock version of the > lookup function. >=20 > Fixes: e605a1d36 ("hash: add lock-free r/w concurrency") > Cc: honnappa.nagarahalli@arm.com >=20 > Suggested-by: Jerin Jacob > Signed-off-by: Honnappa Nagarahalli > Reviewed-by: Ola Liljedahl > Reviewed-by: Gavin Hu > --- Acked-by: Jerin Jacob Tested-by: Jerin Jacob - Reported l3fwd hash regression for ARMv8 platform fixed with this patch by introducing two different code path(obviously!!) - Verified lock version of lookup() is same as e605a1d36~1 changeset + Thomas, If there is no objection, please consider this patch into -RC3