[ovs-dev] [PATCH] ofproto-dpif: Use acquire/release barriers with 'tables_version'.

Ben Pfaff blp at ovn.org
Fri Jan 13 20:23:04 UTC 2017


On Thu, Jan 12, 2017 at 10:17:32AM -0800, Jarno Rajahalme wrote:
> Use memory_order_release when updating the tables version number to
> make sure no memory accesses before the atomic_store (possibly
> relating to setting up the new version) are reordered to take place
> after the atomic_store, which makes the new version available to other
> threads.
> 
> Correspondingly, use memory_order_acquire when reading the
> current tables_version to make sure no later memory accesses (possibly
> relating to the current version) are reordered to take place before
> the atomic_read to ensure that those memory accesses can not relate to
> an older version than returned by the atomic_read.
> 
> Suggested-by: Daniele Di Proietto <ddiproietto at vmware.com>
> Signed-off-by: Jarno Rajahalme <jarno at ovn.org>

Is this a bug fix?

Acked-by: Ben Pfaff <blp at ovn.org>


More information about the dev mailing list