[dpdk-dev] [PATCH, v2] mempool: avoid memory waste with large pagesize

Stephen Hemminger stephen at networkplumber.org
Fri Mar 11 05:09:44 CET 2016


On Thu, 10 Mar 2016 12:12:12 +0100
Olivier MATZ <olivier.matz at 6wind.com> wrote:

> >> It still does not work. When CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG=y:
> >>
> >> mp = rte_mempool_create("test", 128,
> >> 	64, 0, 0, NULL, NULL, NULL, NULL, SOCKET_ID_ANY, 0);
> >> rte_mempool_dump(stdout, mp);
> >>
> >>   populated_size=128
> >>   header_size=64
> >>   elt_size=64
> >>   trailer_size=64
> >>   total_obj_size=192
> >>
> > With --no-huge (since patch updates that part), it gives:
> >   header_size=64
> >   elt_size=64
> >   trailer_size=0
> >   total_obj_size=128
> >   private_data_size=3904
> > 
> > 1- private_data still rounds to page size, not sure if this is a problem.
> > 2- with MEMPOOL_DEBUG=y, trailer_size is 0, comment in code says it
> > should keep cookie, not sure if this is a problem.
> 
> Yes the trailer should at least be 8 bytes to store the cookie.
> 

Ok, will fix. that.


More information about the dev mailing list