Hi, On 04/16/2015 11:18 AM, Gonzalez Monroy, Sergio wrote: > On 16/04/2015 10:03, Gonzalez Monroy, Sergio wrote: >> On 15/04/2015 20:24, Stephen Hemminger wrote: >>> On Wed, 15 Apr 2015 20:15:18 +0100 >>> Zoltan Kiss <zoltan.kiss at linaro.org> wrote: >>> >>>> Hi, >>>> >>>> I have two questions regarding mempools: >>>> >>>> - the first is trivial: how do you delete them? Can you? I can't see a >>>> function to do that, and none of the examples are doing such thing. >>>> When >>>> exactly it get deleted? >>> You can't delete them. They live in hugepage area and are persistent. >>> Correctly written code looks for them by name and reuses existing pool >>> if it is big enough. >>> >> FYI, I'm looking into such functionality and also delete/destroy >> mempools (although still no plan on implementation). >> >> Sergio > Forgot to say, suggestions/ideas are more than welcome.
I think what is required is similar to what I did for the rte_rings some time ago: http://dpdk.org/browse/dpdk/commit/lib/librte_ring/rte_ring.c?id=a182620042aa297ba1dc88f3089537d94b51bcf9 http://dpdk.org/browse/dpdk/commit/lib/librte_ring/rte_ring.c?id=1d64e46eb8c4fb8085513e9be824f2377b9c70c7 The objective would be to allow to allocate a memory zone from any mean (rte_malloc, malloc, ...), and have an API to initialize a mempool inside of this zone. Unfortunately it's probably not as trivial for mempool, as the structure is more complex (it includes a ring, the structure is followed by a variable-size table of physical addresses), and there are some helpers to convert virtual addresses to physical addresses, which is not easy to manage if it's not memzones (especially with the xen part). Regards, Olivier