DPDK usage discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Antonio Di Bacco <a.dibacco.ks@gmail.com>
Cc: users@dpdk.org
Subject: Re: Failure while allocating 1GB hugepages
Date: Thu, 30 May 2024 18:00:22 +0300	[thread overview]
Message-ID: <20240530180022.58cbc8a3@sovereign> (raw)
In-Reply-To: <CAO8pfF=U5dhyheqLSehSL6dtDWBOye6kEhexgY9UrTMkJv1b3Q@mail.gmail.com>

2024-05-30 12:28 (UTC+0200), Antonio Di Bacco:
> Just in case I need, let us say, 1.5 GB CONTIGUOUS memory zone,
> would it be fine to use something like this as GRUB config in Linux?
> 
> default_hugepagesz=2G hugepagesz=2G hugepages=4"

On x86, "hugepagesz" and "default_hugepagesz" may be either 2M or 1G.
There is no way to *guarantee* that there will be
two physically adjacent 1G hugepages forming 1.5GB contiguous space,
but in practice these options, with the above correction, will do.

Note that by default the kernel will spread hugepages between NUMA nodes.
You can control this by a more elaborate form of "hugepages" option:

	https://docs.kernel.org/admin-guide/mm/hugetlbpage.html

  reply	other threads:[~2024-05-30 15:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10  9:33 Antonio Di Bacco
2024-05-10 15:07 ` Dmitry Kozlyuk
2024-05-22 10:22   ` Antonio Di Bacco
2024-05-30 10:28     ` Antonio Di Bacco
2024-05-30 15:00       ` Dmitry Kozlyuk [this message]
2024-06-03 12:39         ` Antonio Di Bacco
2024-06-04 22:50           ` Dmitry Kozlyuk

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=20240530180022.58cbc8a3@sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=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).