zoukankan      html  css  js  c++  java
  • hugepages---No available hugepages reported in hugepages

    [root@localhost dpdk_lcores]# ./build/app/test --lcores "(0,1,2,3,4)@(0,1),(5,6,7,8)@3"
    EAL: Detected 128 lcore(s)
    EAL: Detected 4 NUMA nodes
    EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
    EAL: Selected IOVA mode 'VA'
    EAL: No available hugepages reported in hugepages-2048kB
    EAL: Probing VFIO support...
    EAL: PCI device 0000:05:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:200 net_hinic
    EAL: PCI device 0000:06:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:200 net_hinic
    EAL: PCI device 0000:7d:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:a222 net_hns3
    EAL: PCI device 0000:7d:00.1 on NUMA socket 0
    EAL:   probe driver: 19e5:a221 net_hns3
    EAL: PCI device 0000:7d:00.2 on NUMA socket 0
    EAL:   probe driver: 19e5:a222 net_hns3
    EAL: PCI device 0000:7d:00.3 on NUMA socket 0
    EAL:   probe driver: 19e5:a221 net_hns3
    hello from core 1
    hello from core 2
    hello from core 3
    hello from core 4
    hello from core 5
    hello from core 6
    hello from core 7
    hello from core 8
    hello from core 0
    [root@localhost kni]# ps -elf | grep test
    0 R root      19190  18466 99  80   0 - 8390171 -    05:26 pts/1    00:01:18 ./build/app/test --lcores (0,1,2,3,4)@(0,1),(5,6,7,8)@3
    0 S root      19203  17774  0  80   0 -  1729 pipe_w 05:26 pts/0    00:00:00 grep --color=auto test
    [root@localhost kni]# ps -mo pid,tid,%cpu,psr,rss,trs,pmem,stat,cmd -p  19190
       PID    TID %CPU PSR   RSS  TRS %MEM STAT CMD
     19190      -  220   - 10048 6884  0.0 -    ./build/app/test --lcores (0,1,2,3,4)@(0,1),(5,6,7,8)@3
         -  19190 24.8   0     -    -    - Rl+  -
         -  19191  0.0  44     -    -    - Sl+  -
         -  19192  0.0  45     -    -    - Sl+  -
         -  19193 33.0   1     -    -    - Rl+  -
         -  19194 24.8   0     -    -    - Rl+  -
         -  19195 33.0   1     -    -    - Rl+  -
         -  19196 24.7   0     -    -    - Rl+  -
         -  19197 19.8   3     -    -    - Rl+  -
         -  19198 19.8   3     -    -    - Rl+  -
         -  19199 19.8   3     -    -    - Rl+  -
         -  19200 19.8   3     -    -    - Rl+  -
    [root@localhost kni]# 
    [root@localhost kni]# cat   /sys/devices/system/node/node*/hugepages/hugepages-2048kB/nr_hugepages
    0
    0
    0
    0
    [root@localhost kni]# cat /proc/meminfo | grep Huge
    AnonHugePages:         0 kB
    ShmemHugePages:        0 kB
    HugePages_Total:     256
    HugePages_Free:      255
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:     524288 kB
    [root@localhost kni]#
    [root@localhost kni]# echo 256 >  /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages
     
    [root@localhost kni]# ls  /sys/devices/system/node/node*/hugepages/hugepages-2048kB/nr_hugepages
    /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
    /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
    /sys/devices/system/node/node2/hugepages/hugepages-2048kB/nr_hugepages
    /sys/devices/system/node/node3/hugepages/hugepages-2048kB/nr_hugepages
    [root@localhost kni]# echo 64   /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
    64 /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
    [root@localhost kni]# echo 64   /sys/devices/system/node/node2/hugepages/hugepages-2048kB/nr_hugepages
    64 /sys/devices/system/node/node2/hugepages/hugepages-2048kB/nr_hugepages
    [root@localhost kni]# echo 64   /sys/devices/system/node/node3/hugepages/hugepages-2048kB/nr_hugepages
    64 /sys/devices/system/node/node3/hugepages/hugepages-2048kB/nr_hugepages
    [root@localhost kni]# echo 64   /sys/devices/system/node/node4/hugepages/hugepages-2048kB/nr_hugepages
    64 /sys/devices/system/node/node4/hugepages/hugepages-2048kB/nr_hugepages
    [root@localhost kni]# 

    还是一样

    [root@localhost dpdk_lcores]# ./build/app/test --lcores "(0,1,2,3,4)@(0,1),(5,6,7,8)@3"
    EAL: Detected 128 lcore(s)
    EAL: Detected 4 NUMA nodes
    EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
    EAL: Selected IOVA mode 'VA'
    EAL: No available hugepages reported in hugepages-2048kB
    EAL: Probing VFIO support...
    EAL: PCI device 0000:05:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:200 net_hinic
    EAL: PCI device 0000:06:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:200 net_hinic
    EAL: PCI device 0000:7d:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:a222 net_hns3
    EAL: PCI device 0000:7d:00.1 on NUMA socket 0
    EAL:   probe driver: 19e5:a221 net_hns3
    EAL: PCI device 0000:7d:00.2 on NUMA socket 0
    EAL:   probe driver: 19e5:a222 net_hns3
    EAL: PCI device 0000:7d:00.3 on NUMA socket 0
    EAL:   probe driver: 19e5:a221 net_hns3
    hello from core 1
    hello from core 2
    hello from core 3
    hello from core 4
    hello from core 5
    hello from core 6
    hello from core 7
    hello from core 8
    hello from core 0
    [root@localhost kni]# cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
    0
    [root@localhost kni]# cat /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages
    256
    [root@localhost kni]#
    [root@localhost kni]# echo 256 >>  /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
    [root@localhost kni]# cat /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
    256
    [root@localhost kni]# cat /sys/kernel/mm/hugepages/hugepages-524288kB/nr_hugepages
    256
    [root@localhost kni]# 
    [root@localhost dpdk_lcores]# ./build/app/test --lcores "(0,1,2,3,4)@(0,1),(5,6,7,8)@3"
    EAL: Detected 128 lcore(s)
    EAL: Detected 4 NUMA nodes
    EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
    EAL: Selected IOVA mode 'VA'
    EAL: 256 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
    EAL: Probing VFIO support...
    EAL: PCI device 0000:05:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:200 net_hinic
    EAL: PCI device 0000:06:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:200 net_hinic
    EAL: PCI device 0000:7d:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:a222 net_hns3
    EAL: PCI device 0000:7d:00.1 on NUMA socket 0
    EAL:   probe driver: 19e5:a221 net_hns3
    EAL: PCI device 0000:7d:00.2 on NUMA socket 0
    EAL:   probe driver: 19e5:a222 net_hns3
    EAL: PCI device 0000:7d:00.3 on NUMA socket 0
    EAL:   probe driver: 19e5:a221 net_hns3
    hello from core 1
    hello from core 2
    hello from core 3
    hello from core 4
    hello from core 5
    hello from core 6
    hello from core 7
    hello from core 8
    hello from core 0
    [root@localhost kni]# grep Hugepagesize /proc/meminfo
    Hugepagesize:     524288 kB
    [root@localhost kni]# 

    执行

     umount /mnt/huge/

    [root@localhost kni]# mount -t hugetlbfs none /mnt/huge/ -o pagesize=2MB
    [root@localhost kni]# 
    [root@localhost kni]# cat /proc/meminfo | grep Huge
    AnonHugePages:         0 kB
    ShmemHugePages:        0 kB
    HugePages_Total:     256
    HugePages_Free:      256
    HugePages_Rsvd:        0
    HugePages_Surp:        0
    Hugepagesize:     524288 kB
    [root@localhost kni]# 
    [root@localhost dpdk_lcores]# ./build/app/test --lcores "(0,1,2,3,4)@(0,1),(5,6,7,8)@3"
    EAL: Detected 128 lcore(s)
    EAL: Detected 4 NUMA nodes
    EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
    EAL: Selected IOVA mode 'VA'
    EAL: Probing VFIO support...
    EAL: PCI device 0000:05:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:200 net_hinic
    EAL: PCI device 0000:06:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:200 net_hinic
    EAL: PCI device 0000:7d:00.0 on NUMA socket 0
    EAL:   probe driver: 19e5:a222 net_hns3
    EAL: PCI device 0000:7d:00.1 on NUMA socket 0
    EAL:   probe driver: 19e5:a221 net_hns3
    EAL: PCI device 0000:7d:00.2 on NUMA socket 0
    EAL:   probe driver: 19e5:a222 net_hns3
    EAL: PCI device 0000:7d:00.3 on NUMA socket 0
    EAL:   probe driver: 19e5:a221 net_hns3
    hello from core 1
    hello from core 2
    hello from core 3
    hello from core 4
    hello from core 5
    hello from core 6
    hello from core 7
    hello from core 8
    hello from core 0
    将 hugetlbfs 特殊文件系统挂载到根文件系统的某个目录
    mount -t hugetlbfs hugetlbfs /dev/hugepages (挂载默认的hugeage大小)
    mount -t hugetlbfs none /dev/hugepages_2mb -o pagesize=2MB(挂载2M的)
    1G大页和2M大页必须挂载了才能使用。挂载其中一个,DPDK也能正常运行。
  • 相关阅读:
    加沙地带
    特拉维夫以色列第二大城市,滨临东地中海,以色列最为国际化的经济中心
    1980年,以色列国会立法确定耶路撒冷是该国“永远的与不可分割的首都”。而巴勒斯坦自治政府也宣布耶路撒冷将是未来巴勒斯坦国的首都。在21世纪,耶路撒冷仍然是巴以冲突的中心。
    delete
    NUnit -- Test discovery or execution might not work for this project
    HearthBuddy中_settings.txt的更详细参数解释
    WPF global exception handler
    sftp winscp
    cdn and fallback
    What happens in an async method
  • 原文地址:https://www.cnblogs.com/dream397/p/13566548.html
Copyright © 2011-2022 走看看