[dpdk] dpdk启动几个线程

看别人的代码搞得有点晕,突然有点不确定,再确认一次。

使用 helloworld程序测试一下。

/root/dpdk-16.07/examples/helloworld

一:  只启动一个核心。

[root@DPDK helloworld]# ./build/helloworld -l0

查看结果: 两个线程

[root@DPDK j]# top -H -p `pidof helloworld`
   PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                                                                                                                                     
  4376 root      20   0 1073500   3716   1332 S  0.0  0.2   0:00.22 helloworld                                                                                                                                  
  4377 root      20   0 1073500   3716   1332 S  0.0  0.2   0:00.00 eal-intr-thread  

二:启动三个核心

[root@DPDK helloworld]# ./build/helloworld -l0,1,2

查看结果: 四个线程

[root@DPDK j]# top -H -p `pidof helloworld`
   PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND                                                                                                                                     
  4411 root      20   0 1089892   3728   1332 S  0.0  0.2   0:00.24 helloworld                                                                                                                                  
  4412 root      20   0 1089892   3728   1332 S  0.0  0.2   0:00.00 eal-intr-thread                                                                                                                             
  4413 root      20   0 1089892   3728   1332 S  0.0  0.2   0:00.00 lcore-slave-1                                                                                                                               
  4414 root      20   0 1089892   3728   1332 S  0.0  0.2   0:00.01 lcore-slave-2  

总结: 多了一个eal-intr-thread线程。

原文地址:https://www.cnblogs.com/hugetong/p/8707323.html