From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50057.outbound.protection.outlook.com [40.107.5.57]) by dpdk.org (Postfix) with ESMTP id 939223257 for ; Mon, 12 Nov 2018 05:50:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ciuq25udcPVEf+gcKZrl3ilT1X25zrIsnPsQ98Cm8Hc=; b=hXVLOMsdwj+4294SkLbsNYGHnpk92aYyR29t39LSqLfYMBuJ900l+1Fxwz1P+PtmnV3GIngnCoEXzGhpcI9LfXQefntuM4OqJN9MUsQ5V1uMuC2SzqzWVBHSESUSwhRr9zhE6VIh4PTNyhx+t7nYcD24U/fuiMRKvF/bP3W11CE= Received: from AM6PR08MB3672.eurprd08.prod.outlook.com (20.177.115.29) by AM6PR08MB3959.eurprd08.prod.outlook.com (20.179.0.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.24; Mon, 12 Nov 2018 04:50:42 +0000 Received: from AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::c1a0:51bf:cd33:2b27]) by AM6PR08MB3672.eurprd08.prod.outlook.com ([fe80::c1a0:51bf:cd33:2b27%6]) with mapi id 15.20.1294.044; Mon, 12 Nov 2018 04:50:42 +0000 From: Honnappa Nagarahalli To: "Wang, Yipeng1" , "Richardson, Bruce" , "De Lara Guarch, Pablo" CC: "dev@dpdk.org" , "jerin.jacob@caviumnetworks.com" , "hemant.agrawal@nxp.com" , "chaozhu@linux.vnet.ibm.com" , Dharmik Thakkar , "Gavin Hu (Arm Technology China)" , nd , nd Thread-Topic: [PATCH v2 1/1] hash: separate lf and rw lock lookup code paths Thread-Index: AQHUegeWLJxqxL0alEGIuNTqEzvUXaVLkeKw Date: Mon, 12 Nov 2018 04:50:41 +0000 Message-ID: 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: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Honnappa.Nagarahalli@arm.com; x-originating-ip: [217.140.111.135] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR08MB3959; 6:TmpLTUVoemrqXpEIPGH8kYjANSSM7xB1nV/HmmpxqnkABowhDklHNhjrhS5T4jej8TjQfBsX5Vxha+p2os7BoY3LklfT5w95dMbOZJJ0TBp9XaoT2x4zNQVNQ7iN5LzlJYXHdkXyo4zaVqaCz8/LWQPMmai/8CskADUlT2e+jKjwQEFpAxLaOVAEMsWEa2wjPYZ9F5WQzWSNyN9Vu4exSaksRb1+zNuaPNglJoxZ6dti4qF+8uBezCg7+Z1lXP0HN4L+pjTh6n6namHdVP+4eFocQZjUYLUvckaq30SnbQHtV8fbmcSw22tL+u2uoYb+8rHaA2dFjH/7RhBfrKnVOUcCdVSkVlNq83Juo20syzLtLhwJ1P81ZGFItbG9EH1V3+8y5AGATwubFjEmna77rJvzFmChwjaoDLGX3II3mYpP38QzKEzzlaAojbVwsLlJivNTTvmNVSjf5Vq/YHbkYQ==; 5:/OB0OqXaffSc4f3psLz8ww8RfmGAJRNqD97//RkIvmQzEUxUG4g8d/euuxAoNE54e+iIkJD2zjgbG+dGTC2bDQfthnoU97ms5ELV8JNVr+ak66O26/8rm9TGYGajhhR4b9e+NXE+f1ESP2+T8hP1F5bRkuwBQIVP1jlsspyOcYA=; 7:iIbS0W0ZLklpgVPaiDX6UPHxuCDhx5lHO5NHJdYJxrHQQVIY0cnNtlKEHp6I/S48K6fGwdw5Rxdkg95spuwR8eksKqte50SYuIzs1jC6njJUTAG/y+JAPK/8hzevEWwLBtoo+HH5fn7kJBNggjK+Kg== x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-correlation-id: ce119d97-d5b5-41b3-f2d3-08d6485a664f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390040)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:AM6PR08MB3959; x-ms-traffictypediagnostic: AM6PR08MB3959: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(3231382)(944501410)(52105112)(10201501046)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:AM6PR08MB3959; BCL:0; PCL:0; RULEID:; SRVR:AM6PR08MB3959; x-forefront-prvs: 0854128AF0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39850400004)(366004)(346002)(396003)(376002)(199004)(189003)(68736007)(71190400001)(71200400001)(74316002)(2906002)(4326008)(25786009)(7736002)(102836004)(81166006)(305945005)(99286004)(93886005)(7696005)(6506007)(316002)(72206003)(97736004)(6436002)(81156014)(478600001)(8676002)(8936002)(14454004)(6246003)(14444005)(11346002)(86362001)(106356001)(446003)(105586002)(476003)(186003)(486006)(256004)(26005)(54906003)(3846002)(76176011)(110136005)(6116002)(66066001)(33656002)(53936002)(55016002)(9686003)(229853002)(2900100001)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB3959; H:AM6PR08MB3672.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 6opTBQNctTNMDIZjtEPo9vD7pOuXz+JwADuHErJXcF3pimdQSBVr0zPezM1eHCais9Y2zK8ncLpqIHDLaDt1nMptWO9TOkHuVjTQ5e9xsSzSvZz3sHCfnflxVn5RaXu6eIVNGmU5/PMMV+rE0P7TH+MYzmKK3Xw15g/ABLcwcjp4vjq73ipB95L9n1bP3F2rohLBD8WUh6Zy5LpdESMKMOCDNfUEGA9dkla6cyu14n+ZuxEMIjIXNsjwZkB+cDQpGl/KMbIFLIadCIuHyo5bzF1GU9tEHVZcus3WppOpaxGYK2xGJnxmVdXmj+DFLuY5+7AXLvG04GyW4WJiP4NWKPz4Qp2ewlG8GVlFnB7CMbI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce119d97-d5b5-41b3-f2d3-08d6485a664f X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Nov 2018 04:50:41.9215 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3959 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: Mon, 12 Nov 2018 04:50:43 -0000 > > Subject: [PATCH v2 1/1] hash: separate lf and rw lock lookup code > > paths > > > > 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. > > > > Fixes: e605a1d36 ("hash: add lock-free r/w concurrency") > > Cc: honnappa.nagarahalli@arm.com > > > > Suggested-by: Jerin Jacob > > Signed-off-by: Honnappa Nagarahalli > > Reviewed-by: Ola Liljedahl > > Reviewed-by: Gavin Hu > > --- > [Wang, Yipeng] > I tested my modified l3fwd with this new patch applied on x86 platform an= d it > does not cause any performance drop anymore. >=20 > There are extra code duplication though but I believe in future version > together with fined-grained lock, the duplication could be fixed later. >=20 Thank you Yipeng for testing this. Agree, the code duplication is worrying.= I will try to get the optimization patch out soon. Once we have that we ca= n do the testing and take a decision to address the duplication.