[dpdk-dev] [PATCH v3 1/8] stack: introduce rte stack library
Honnappa Nagarahalli
Honnappa.Nagarahalli at arm.com
Mon Apr 1 19:41:23 CEST 2019
>
> > > +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?
More information about the dev
mailing list