[dpdk-dev] [PATCH v2 1/1] hash: separate lf and rw lock lookup code paths

Wang, Yipeng1 yipeng1.wang at intel.com
Sun Nov 11 22:43:31 CET 2018


> -----Original Message-----
> From: Honnappa Nagarahalli [mailto:honnappa.nagarahalli at arm.com]
> Sent: Saturday, November 10, 2018 10:56 AM
> To: Richardson, Bruce <bruce.richardson at intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch at intel.com>
> Cc: dev at dpdk.org; jerin.jacob at caviumnetworks.com;
> hemant.agrawal at nxp.com; chaozhu at linux.vnet.ibm.com; Wang, Yipeng1
> <yipeng1.wang at intel.com>; dharmik.thakkar at arm.com; gavin.hu at arm.com;
> honnappa.nagarahalli at arm.com; nd at arm.com
> 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 at arm.com
> 
> Suggested-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Reviewed-by: Ola Liljedahl <ola.liljedahl at arm.com>
> Reviewed-by: Gavin Hu <gavin.hu at arm.com>
> ---
[Wang, Yipeng] 
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 together
with fined-grained lock, the duplication could be fixed later.




More information about the dev mailing list