> > > > +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?
- [dpdk-dev] [PATCH v2 7/8] test/stack: add lock-free s... Gage Eads
- [dpdk-dev] [PATCH v2 6/8] stack: add C11 atomic imple... Gage Eads
- [dpdk-dev] [PATCH v2 5/8] stack: add lock-free stack ... Gage Eads
- [dpdk-dev] [PATCH v2 8/8] mempool/stack: add lock-fre... Gage Eads
- [dpdk-dev] [PATCH v3 0/8] Add stack library and new m... Gage Eads
- [dpdk-dev] [PATCH v3 1/8] stack: introduce rte s... Gage Eads
- Re: [dpdk-dev] [PATCH v3 1/8] stack: introdu... Olivier Matz
- Re: [dpdk-dev] [PATCH v3 1/8] stack: introdu... Honnappa Nagarahalli
- Re: [dpdk-dev] [PATCH v3 1/8] stack: int... Eads, Gage
- Re: [dpdk-dev] [PATCH v3 1/8] stack:... Thomas Monjalon
- Re: [dpdk-dev] [PATCH v3 1/8] stack:... Honnappa Nagarahalli
- Re: [dpdk-dev] [PATCH v3 1/8] s... Eads, Gage
- [dpdk-dev] [PATCH v3 2/8] mempool/stack: convert... Gage Eads
- [dpdk-dev] [PATCH v3 3/8] test/stack: add stack ... Gage Eads
- Re: [dpdk-dev] [PATCH v3 3/8] test/stack: ad... Olivier Matz
- [dpdk-dev] [PATCH v3 5/8] stack: add lock-free s... Gage Eads
- Re: [dpdk-dev] [PATCH v3 5/8] stack: add loc... Olivier Matz
- Re: [dpdk-dev] [PATCH v3 5/8] stack: add loc... Honnappa Nagarahalli
- Re: [dpdk-dev] [PATCH v3 5/8] stack: add... Eads, Gage
- [dpdk-dev] [PATCH v3 4/8] test/stack: add stack ... Gage Eads
- [dpdk-dev] [PATCH v3 7/8] test/stack: add lock-f... Gage Eads