.. code-block:: console
- echo 8 > /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages
- mkdir /mnt/huge
- mount -t hugetlbfs nodev /mnt/huge
+ dpdk-hugepages.py --setup 4G --pagesize 512M
Example applications can now be executed with crypto operations offloaded to
OCTEON TX crypto PMD.
* Ensure that sufficient huge pages are available for your application::
- echo 8 > /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages
+ dpdk-hugepages.py --setup 4G --pagesize 512M
Refer to :ref:`linux_gsg_hugepages` for more details.
# virtio port is 03
# vf port is 04
- cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
- echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
- cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
+ /root/dpdk/usertools/dpdk-hugepages.py --show
+ /root/dpdk/usertools/dpdk-hugepages.py --setup 2G
+ /root/dpdk/usertools/dpdk-hugepages.py --show
ifconfig -a
/root/dpdk/usertools/dpdk-devbind.py --status
# virtio port is 03
# virtio port is 04
- cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
- echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
- cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
+ /root/dpdk/usertools/dpdk-hugepages.py --show
+ /root/dpdk/usertools/dpdk-hugepages.py --setup 2G
+ /root/dpdk/usertools/dpdk-hugepages.py --show
ifconfig -a
/root/dpdk/usertools/dpdk-devbind.py --status
echo 1024 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
echo 1024 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
+The tool ``dpdk-hugepages.py`` can be used to manage hugepages.
+
.. note::
Some kernel versions may not allow reserving 1 GB hugepages at run time,
Hugepagesize: 2048 kB
+ Mount and request above can be achieved simply with this tool:
+
+ .. code-block:: console
+
+ dpdk-hugepages.py --setup 2G
+
#. Load ``igb_uio`` or ``vfio-pci`` driver:
.. code-block:: console
#. Request huge pages::
- echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
+ dpdk-hugepages.py --setup 2G
#. Start testpmd with basic parameters::
#. Request huge pages::
- echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages
+ dpdk-hugepages.py --setup 2G
#. Start testpmd with basic parameters::
.. code-block:: console
modprobe uio
- echo 512 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
+ dpdk-hugepages.py --setup 1G
modprobe uio_pci_generic
./usertools/dpdk-devbind.py -b uio_pci_generic 00:03.0
.. code-block:: console
- cat /sys/kernel/mm/hugepages/hugepages-<pagesize>/nr_hugepages
+ dpdk-hugepages.py --show
The command above indicates how many hugepages are free to support QEMU's
allocation request.