Paolo Valerio <[email protected]> writes: > From: Gaetan Rivet <[email protected]> > > A lock is taken during conn_lookup() to check whether a connection is > expired before returning it. This lock can have some contention. > > Even though this lock ensures a consistent sequence of writes, it does > not imply a specific order. A ct_clean thread taking the lock first > could read a value that would be updated immediately after by a PMD > waiting on the same lock, just as well as the inverse order. > > As such, the expiration time can be stale anytime it is read. In this > context, using an atomic will ensure the same guarantees for either > writes or reads, i.e. writes are consistent and reads are not undefined > behaviour. Reading an atomic is however less costly than taking and > releasing a lock. > > Signed-off-by: Gaetan Rivet <[email protected]> > Signed-off-by: Paolo Valerio <[email protected]> > ---
Acked-by: Aaron Conole <[email protected]> _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
