Re: [PATCH] eal: add seqlock

2022-03-30 Thread Mattias Rönnblom
On 2022-03-30 12:50, Morten Brørup wrote: >> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] >> Sent: Wednesday, 30 March 2022 12.07 >> + >> +/** >> + * The RTE seqlock type. >> + */ >> +typedef struct { >> +uint32_t sn; /**< A generation number for the protected data. */ >> +

Re: [PATCH] eal: add seqlock

2022-03-30 Thread Tyler Retzlaff
On Wed, Mar 30, 2022 at 12:50:42PM +0200, Morten Brørup wrote: > > From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > > Sent: Wednesday, 30 March 2022 12.07 > > > + > > +/** > > + * The RTE seqlock type. > > + */ > > +typedef struct { > > + uint32_t sn; /**< A generation number for

RE: [PATCH] eal: add seqlock

2022-03-30 Thread Morten Brørup
> From: Mattias Rönnblom [mailto:mattias.ronnb...@ericsson.com] > Sent: Wednesday, 30 March 2022 12.07 > + > +/** > + * The RTE seqlock type. > + */ > +typedef struct { > + uint32_t sn; /**< A generation number for the protected data. */ > + rte_spinlock_t lock; /**< Spinlock used to seria

[PATCH] eal: add seqlock

2022-03-30 Thread Mattias Rönnblom
A sequence lock (seqlock) is synchronization primitive which allows for data-race free, low-overhead, high-frequency reads, especially for data structures shared across many cores and which are updated with relatively infrequently. A seqlock permits multiple parallel readers. The variant of seqloc