Embedded Intel® Core™ Processors
Communicate Intel® Core™ Hardware, Software, Firmware, Graphics Concerns
1208 Discussions

DPDK on RedHat how to allocate hugepages on a NUMA node in grub.conf

MFrey5
Novice
3,509 Views

I am running the DPDK on a Red Hat2.6.32 on a 2 NUMA nodes board.

The DPDK application is running on the NUMA node 1

I can successfully allocate 2M huge pages on the NUMA node 1 at run time with the command:

echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages

I would like to allocate 2G hugepages at the kernel init time.

I can not see in the kernel option in /boot/grub/grub.conf how to explicitely allocate the hugepages on the NUMA node 1

It seems that with the parameters "default_hugepagesz=1G hugepagesz=1G hugepages=4" the Huge page allocation takes place uniformly across NUMA nodes.

I could allocate 2G on both NUMA nodes but it is not very efficient memory wise.

Is there a way to allocate the 1G hugepages at kernel intialisation time on a specific NUMA node ?

0 Kudos
4 Replies
Natalie_Z_Intel
Employee
1,988 Views

Welcome back to the Intel Embedded Community, Marc! I'm working on getting an answer to your question. Have a great day and we'll be talking with you soon!

0 Kudos
Liang-min_W_Intel
1,988 Views

Current x86 processor supports 4K/2M/4M/1G page size. So assume you meant 1G page size and you could set page number to 2 for 2G. For processor supports 1G page size, it also support page size of 2M and 4K. In this case, you could either allocate 2M huge pages or 1G huge pages. For a NUMA system, you could allocate different huge pages for each socket (processor): using the runtime setup that you described in your question just need to change page size on your sys file name.

0 Kudos
MFrey5
Novice
1,988 Views

Hi Larry,

My DPDK application runs on the cores on the NUMA node 1. So I only need a 2x1G hugepage allocation on the NUMA node 1.

I do not need to reserve a 2x1G hugepage on the socket 0. It would be a waste of memory and the cores on the socket 0 are running a standard Linux application that needs memory.

So basically, I would like to reserve 2x1Gbyte of hugepages ONLY on the socket 1.

I can not figure out if the kernel has the proper parameters to do this in the glub.conf file

0 Kudos
Liang-min_W_Intel
1,988 Views

Linux kernel only supports 4k page (for a reason). The parameter that you specify in grub is only used as a parameter for a uio-alike kernel module to create a device file system to enable user in user-space to allocate huge pages. The init script in grub doesn't allocate huge page. So if you only want to allocate huge pages for node 0, then you should only change the nr_hugepages for node # 0. Hope that answer your questions.

Larry

0 Kudos
Reply