mempool deleting and cache_size
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?
- during creation, cache_size have one requirement: it has to be smaller than RTE_MEMPOOL_CACHE_MAX_SIZE. And one recommendation: "n modulo cache_size == 0". Is there any more guideline to determine that number? E.g. now I'm using the biggest number which fits the above two conditions.
Regards,
Zoltan
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · On Wed, 15 Apr 2015 20:15:18 +0100 Zoltan Kiss…
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.
Quoted 5 lines · Stephen Hemminger
Quoted 2 lines · On Wed, 15 Apr 2015 20:15:18 +0100 Zoltan Kiss…
Hi,
Quoted 9 lines
Quoted 5 lines
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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Sergio
Quoted 10 lines · Stephen Hemminger
Quoted 7 lines · On Wed, 15 Apr 2015 20:15:18 +0100 Zoltan Kiss…
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?
Quoted 7 lines
Quoted 4 lines
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.
Sergio
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 17 lines · Sergio
Quoted 16 lines · Sergio
Quoted 15 lines · Stephen Hemminger
Quoted 8 lines · On Wed, 15 Apr 2015 20:15:18 +0100 Zoltan Kiss…
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.
Quoted 5 lines
Quoted 4 lines
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
Quoted 8 lines · Sergio
Quoted 7 lines · Stephen Hemminger
Quoted 4 lines · On Wed, 15 Apr 2015 20:15:18 +0100 Zoltan Kiss…
Hi,
I have two questions regarding mempools:
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
- 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).
Also the memzones behind, or will be "lost/leaked" after a mempool destruction?
Marc
Quoted 1 line
Sergio
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 18 lines · Marc Sune
Quoted 15 lines · Sergio
Quoted 14 lines · Stephen Hemminger
Quoted 7 lines · On Wed, 15 Apr 2015 20:15:18 +0100 Zoltan Kiss…
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.
Quoted 9 lines
Quoted 2 lines
FYI, I'm looking into such functionality and also delete/destroy mempools (although still no plan on implementation).
Also the memzones behind, or will be "lost/leaked" after a mempool destruction?
Marc
Quoted 1 line
Sergio
Sorry, my bad.
I did mean to say 'delete/destroy memzones' :)
Sergio
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 23 lines · Sergio
Quoted 22 lines · Marc Sune
Quoted 18 lines · Sergio
Quoted 7 lines · Stephen Hemminger
Quoted 4 lines · On Wed, 15 Apr 2015 20:15:18 +0100 Zoltan Kiss…
Hi,
I have two questions regarding mempools:
Quoted 8 lines
Quoted 4 lines
- 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).
Quoted 8 lines
Quoted 6 lines
Also the memzones behind, or will be "lost/leaked" after a mempool destruction?
Marc
Quoted 1 line
Sergio
Sorry, my bad.
I did mean to say 'delete/destroy memzones' :)
Good,
That would make the KNI memzone pool not necessary anymore:
http://article.gmane.org/gmane.comp.networking.dpdk.devel/6890/
If your patch gets accepted I will adapt that.
Marc
Quoted 2 lines
Sergio
Hi,
Quoted 12 lines · Zoltan Kiss
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?
- during creation,cache_sizehave one requirement: it has to be smaller thanRTE_MEMPOOL_CACHE_MAX_SIZE. And one recommendation: "n modulocache_size== 0". Is there any more guideline to determine that number? E.g. now I'm using the biggest number which fits the above two conditions.
Quoted 3 lines
Regards,
Zoltan
Thanks for all the answers for the first one, but does anyone has an idea for the second one?
Zoli