DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Question about cache_size in rte_mempool_create
@ 2017-11-23 21:05 Roy Shterman
  2017-11-24  9:30 ` Bruce Richardson
  0 siblings, 1 reply; 6+ messages in thread
From: Roy Shterman @ 2017-11-23 21:05 UTC (permalink / raw)
  To: dev

Hi,

In the documentation it says that:

 * @param cache_size
 *   If cache_size is non-zero, the rte_mempool library will try to
 *   limit the accesses to the common lockless pool, by maintaining a
 *   per-lcore object cache. This argument must be lower or equal to
 *   CONFIG_RTE_MEMPOOL_CACHE_MAX_SIZE and n / 1.5.* It is advised to
choose*
* *   cache_size to have "n modulo cache_size == 0": if this is*
* *   not the case, some elements will always stay in the pool and will*
* *   never be used.* The access to the per-lcore table is of course
 *   faster than the multi-producer/consumer pool. The cache can be
 *   disabled if the cache_size argument is set to 0; it can be useful to
 *   avoid losing objects in cache.

I wonder if someone can please explain the high-lightened sentence, how the
cache size affects the objects inside the ring. And also does it mean that
if I'm sharing pool between different cores can it be that a core sees the
pool as empty although it has objects in it?

Thanks,
Roy

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-24 13:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-23 21:05 [dpdk-dev] Question about cache_size in rte_mempool_create Roy Shterman
2017-11-24  9:30 ` Bruce Richardson
2017-11-24  9:39   ` roy
2017-11-24 10:03     ` Bruce Richardson
2017-11-24 11:01       ` Roy Shterman
2017-11-24 13:19         ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).