From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] memzone: fix memzone size on reserving biggest memzone
Date: Thu, 10 May 2018 15:47:29 +0000 [thread overview]
Message-ID: <2601191342CEEE43887BDE71AB977258AEDC5650@irsmsx105.ger.corp.intel.com> (raw)
In-Reply-To: <4b68272d7ef0d47ec64c5004a548eef04baa15db.1525362936.git.anatoly.burakov@intel.com>
> -----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
next prev parent reply other threads:[~2018-05-10 15:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 16:00 Anatoly Burakov
2018-05-10 15:47 ` Ananyev, Konstantin [this message]
2018-05-14 0:04 ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2601191342CEEE43887BDE71AB977258AEDC5650@irsmsx105.ger.corp.intel.com \
--to=konstantin.ananyev@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).