From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id D1A3F201 for ; Sun, 11 Nov 2018 22:43:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Nov 2018 13:43:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,492,1534834800"; d="scan'208";a="107386063" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by orsmga001.jf.intel.com with ESMTP; 11 Nov 2018 13:43:32 -0800 Received: from orsmsx105.amr.corp.intel.com ([169.254.2.237]) by ORSMSX108.amr.corp.intel.com ([169.254.2.228]) with mapi id 14.03.0415.000; Sun, 11 Nov 2018 13:43:31 -0800 From: "Wang, Yipeng1" To: Honnappa Nagarahalli , "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@arm.com" , "gavin.hu@arm.com" , "nd@arm.com" Thread-Topic: [PATCH v2 1/1] hash: separate lf and rw lock lookup code paths Thread-Index: AQHUeScM6XjR1GmMTkq/7bujFwtp+6VLGqqw Date: Sun, 11 Nov 2018 21:43:31 +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: <20181110185534.5444-2-honnappa.nagarahalli@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODk1MWViNjEtNmE2Zi00MTQ3LTg2MDUtZDU4ZThkYjNkN2U1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieFlNUWNzY2NONHpCSG5vN2hIRWZ2SXJvdndnbkpMc1BXKzFXVVQzaWRnWVhJa25kaVZ2YTlDdlVGM3hoNW1tWCJ9 x-originating-ip: [10.22.254.140] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 21:43:34 -0000 > -----Original Message----- > From: Honnappa Nagarahalli [mailto:honnappa.nagarahalli@arm.com] > Sent: Saturday, November 10, 2018 10:56 AM > To: Richardson, Bruce ; De Lara Guarch, Pablo > > Cc: dev@dpdk.org; jerin.jacob@caviumnetworks.com; > hemant.agrawal@nxp.com; chaozhu@linux.vnet.ibm.com; Wang, Yipeng1 > ; 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 >=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 loc= k > 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 > --- [Wang, Yipeng]=20 I tested my modified l3fwd with this new patch applied on x86 platform and = it does not cause any performance drop anymore. There are extra code duplication though but I believe in future version tog= ether with fined-grained lock, the duplication could be fixed later.