> 
> > > +static ssize_t
> > > +rte_stack_get_memsize(unsigned int count) {
> > > + ssize_t sz = sizeof(struct rte_stack);
> > > +
> > > + /* Add padding to avoid false sharing conflicts */
> > > + sz += RTE_CACHE_LINE_ROUNDUP(count * sizeof(void *)) +
> > > +         2 * RTE_CACHE_LINE_SIZE;
> > I did not understand how the false sharing is caused and how this
> > padding is solving the issue. Verbose comments would help.
> 
> The additional padding (beyond the CACHE_LINE_ROUNDUP) is to prevent
> false sharing caused by adjacent/next-line hardware prefetchers. I'll address
> this.
> 
Is it not a generic problem? Or is it specific to this library?

Reply via email to