DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] rte_mempool_get_bulk uses either cache or common pool
@ 2019-10-11 11:24 Morten Brørup
  2019-10-16  7:22 ` Olivier Matz
  0 siblings, 1 reply; 3+ messages in thread
From: Morten Brørup @ 2019-10-11 11:24 UTC (permalink / raw)
  To: Olivier Matz, Andrew Rybchenko; +Cc: dpdk-dev

The rte_mempool_get_bulk() documentation says:

"If cache is enabled, objects will be retrieved first from cache, subsequently from the common pool."

But __mempool_generic_get() only uses the cache if the request is smaller than the cache size. If not, objects will be retrieved from the common pool only.

Either the documentation should be corrected, or the implementation should behave as described, i.e. retrieve the first of the objects from the cache and the remaining objects from the common pool.


PS: I stumbled into this while writing the unit test for mbuf bulk alloc/free.

PPS: It seems unit tests for mempool bulk alloc/free are missing. :-)


Med venlig hilsen / kind regards
- Morten Brørup



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

end of thread, other threads:[~2019-10-17  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 11:24 [dpdk-dev] rte_mempool_get_bulk uses either cache or common pool Morten Brørup
2019-10-16  7:22 ` Olivier Matz
2019-10-17  9:46   ` Morten Brørup

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).