On Wed, Mar 04, 2015 at 12:06:42PM +0000, Daniele Di Proietto wrote: > Factor out the counter lock from the cmap implementation. > > A writer-prioritizing counter-based R/W spinlock is introduced with this > commit. The code is taken from the cmap implementation. It will be used > also in subsequent commits. > > Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com>
I don't plan to review the whole series but new primitives always catch my eye. I think that it would be more natural to call these seqlocks, since that is what Linux calls the same synchronization primitive. Do you mean "inappropriate" here? Thread-local data ordinarily has only a single reader and a single writer: + * Another appropriate use case is to protect thread-local data from + * reader/writer concurrent access: if the data is written only by a single + * thread, external synchronization is unnecessary. Acked-by: Ben Pfaff <b...@nicira.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev