[dts] [PATCH] modify the initialization of core list on linux

Liu, Yong yong.liu at intel.com
Thu Jul 14 15:44:46 CEST 2016


Applied, thanks. Please check on other linux distribution.

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of yongjie
> Sent: Thursday, July 14, 2016 10:51 AM
> To: dts at dpdk.org
> Cc: Gu, YongjieX
> Subject: [dts] [PATCH] modify the initialization of core list on linux
> 
> Change the order to obtain socket info by "lscpu -p"
> Output of "lscpu -p" on Ubuntu14.04:
> # The following is the parsable format, which can be fed to other
> # programs. Each different item in every column has an unique ID
> # starting from zero.
> # CPU,Core,Socket,Node,,L1d,L1i,L2,L3
> 0,0,0,0,,0,0,0,0
> 1,1,0,1,,1,1,1,0
> 2,2,0,0,,2,2,2,0
> 3,3,0,0,,3,3,3,0
> 4,4,0,0,,4,4,4,0
> 5,5,0,0,,5,5,5,0
> 6,6,0,81,,6,6,6,0
> 7,7,0,0,,7,7,7,0
> 8,8,0,1920169263,,8,8,8,0
> 9,9,0,1634235183,,9,9,9,0
> 10,10,1,1815045490,,10,10,10,1
> ...
> 37,17,1,0,,17,17,17,1
> 38,18,1,20778128,,18,18,18,1
> 39,19,1,0,,19,19,19,1
> 
> 
> Signed-off-by: yongjie <yongjiex.gu at intel.com>
> ---
>  framework/crb.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/framework/crb.py b/framework/crb.py
> index b302a76..066bb3f 100644
> --- a/framework/crb.py
> +++ b/framework/crb.py
> @@ -505,7 +505,7 @@ class Crb(object):
>          core_id = 0
>          coremap = {}
>          for line in cpuinfo:
> -            (thread, core, unused, socket) = line.split(',')[0:4]
> +            (thread, core, socket, unused) = line.split(',')[0:4]
> 
>              if core not in coremap.keys():
>                  coremap[core] = core_id
> --
> 2.1.4



More information about the dts mailing list