DPDK usage discussions
 help / color / mirror / Atom feed
From: Antonio Di Bacco <a.dibacco.ks@gmail.com>
To: users@dpdk.org
Subject: rte_memzone_reserve_aligned always allocate 1GB hugepages irrespective of the size I request I allocate
Date: Tue, 19 Jul 2022 17:11:13 +0200	[thread overview]
Message-ID: <CAO8pfFmC=RKXR_fgfX7XMjQVxcQqZZJYEWkfpKQ1=yY7vHhfWg@mail.gmail.com> (raw)

I'm working on a system that has the following hugepages configuration:
##
sudo dpdk-hugepages.py -s
Node Pages Size Total
2    256   2Mb    512Mb
2    8     1Gb    8Gb
0    256   2Mb    512Mb
0    8     1Gb    8Gb
3    256   2Mb    512Mb
3    8     1Gb    8Gb
1    256   2Mb    512Mb
1    8     1Gb    8Gb
Hugepages mounted on /dev/hugepages
##

If I try to allocate memory with
rte_memzone_reserve_aligned(mem_name, 1024*1024, socket_id,
RTE_MEMZONE_2MB | RTE_MEMZONE_SIZE_HINT_ONLY |
RTE_MEMZONE_IOVA_CONTIG, RTE_CACHE_LINE_SIZE):

it always allocate the memory on 1GB hugepage.

If I remove RTE_MEMZONE_SIZE_HINT_ONLY flag, the allocation fails.


Regards.

                 reply	other threads:[~2022-07-19 15:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAO8pfFmC=RKXR_fgfX7XMjQVxcQqZZJYEWkfpKQ1=yY7vHhfWg@mail.gmail.com' \
    --to=a.dibacco.ks@gmail.com \
    --cc=users@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).