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