* [dpdk-dev] [PATCH] memzone: fix memzone size on reserving biggest memzone
@ 2018-05-03 16:00 Anatoly Burakov
2018-05-10 15:47 ` Ananyev, Konstantin
0 siblings, 1 reply; 3+ messages in thread
From: Anatoly Burakov @ 2018-05-03 16:00 UTC (permalink / raw)
To: dev; +Cc: stable
Size of malloc heap elements include overhead, which sould not
be counted as part of memzone.
Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
lib/librte_eal/common/eal_common_memzone.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c
index bce3321..0595b3a 100644
--- a/lib/librte_eal/common/eal_common_memzone.c
+++ b/lib/librte_eal/common/eal_common_memzone.c
@@ -213,7 +213,8 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,
snprintf(mz->name, sizeof(mz->name), "%s", name);
mz->iova = rte_malloc_virt2iova(mz_addr);
mz->addr = mz_addr;
- mz->len = (requested_len == 0 ? elem->size : requested_len);
+ mz->len = (requested_len == 0 ?
+ (elem->size - MALLOC_ELEM_OVERHEAD) : requested_len);
mz->hugepage_sz = elem->msl->page_sz;
mz->socket_id = elem->msl->socket_id;
mz->flags = 0;
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] memzone: fix memzone size on reserving biggest memzone
2018-05-03 16:00 [dpdk-dev] [PATCH] memzone: fix memzone size on reserving biggest memzone Anatoly Burakov
@ 2018-05-10 15:47 ` Ananyev, Konstantin
2018-05-14 0:04 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Ananyev, Konstantin @ 2018-05-10 15:47 UTC (permalink / raw)
To: Burakov, Anatoly, dev; +Cc: stable
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Anatoly Burakov
> Sent: Thursday, May 3, 2018 5:01 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] memzone: fix memzone size on reserving biggest memzone
>
> Size of malloc heap elements include overhead, which sould not
> be counted as part of memzone.
>
> Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc")
> Cc: stable@dpdk.org
>
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> lib/librte_eal/common/eal_common_memzone.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c
> index bce3321..0595b3a 100644
> --- a/lib/librte_eal/common/eal_common_memzone.c
> +++ b/lib/librte_eal/common/eal_common_memzone.c
> @@ -213,7 +213,8 @@ memzone_reserve_aligned_thread_unsafe(const char *name, size_t len,
> snprintf(mz->name, sizeof(mz->name), "%s", name);
> mz->iova = rte_malloc_virt2iova(mz_addr);
> mz->addr = mz_addr;
> - mz->len = (requested_len == 0 ? elem->size : requested_len);
> + mz->len = (requested_len == 0 ?
> + (elem->size - MALLOC_ELEM_OVERHEAD) : requested_len);
> mz->hugepage_sz = elem->msl->page_sz;
> mz->socket_id = elem->msl->socket_id;
> mz->flags = 0;
> --
> 2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] memzone: fix memzone size on reserving biggest memzone
2018-05-10 15:47 ` Ananyev, Konstantin
@ 2018-05-14 0:04 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-05-14 0:04 UTC (permalink / raw)
To: Burakov, Anatoly; +Cc: stable, Ananyev, Konstantin, dev
> > Size of malloc heap elements include overhead, which sould not
> > be counted as part of memzone.
> >
> > Fixes: fafcc11985a2 ("mem: rework memzone to be allocated by malloc")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
>
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-14 0:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03 16:00 [dpdk-dev] [PATCH] memzone: fix memzone size on reserving biggest memzone Anatoly Burakov
2018-05-10 15:47 ` Ananyev, Konstantin
2018-05-14 0:04 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
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).