<snip>

> >> +static inline void
> >> +rte_seqlock_write_end(rte_seqlock_t *seqlock) {
> >> +  uint32_t sn;
> >> +
> >> +  sn = seqlock->sn + 1;
> >> +
> >> +  /* synchronizes-with the load acquire in rte_seqlock_begin()
> >> */
> >> +  __atomic_store_n(&seqlock->sn, sn, __ATOMIC_RELEASE);
> >> +
> >> +  rte_spinlock_unlock(&seqlock->lock);
> > Atomic store is not necessary here, the atomic operation in
> > spinlock_unlock wil assure theat the seqeuence number update is
> > ordered correctly.
> Load-acquire(seqlock->sn) in rte_seqlock_begin() must be paired with
> store-release(seqlock->sn) in rte_seqlock_write_end() or there wouldn't exist
> any synchronize-with relationship. Readers don't access the spin lock so any
> writer-side updates to the spin lock don't mean anything to readers.
Agree with this assessment. The store-release in spin-lock unlock does not 
synchronize with the readers.

Reply via email to