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

Honnappa Nagarahalli Honnappa.Nagarahalli at arm.com
Mon Nov 12 05:50:41 CET 2018


> > 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.
> 
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 can do the testing and take a decision to address the duplication.



More information about the dev mailing list