test suite reviews and discussions
 help / color / mirror / Atom feed
From: yongjie <yongjiex.gu@intel.com>
To: dts@dpdk.org
Cc: yongjie <yongjiex.gu@intel.com>
Subject: [dts] [PATCH] modify the initialization of core list on linux
Date: Thu, 14 Jul 2016 10:50:42 +0800	[thread overview]
Message-ID: <1468464642-45496-1-git-send-email-yongjiex.gu@intel.com> (raw)

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@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

             reply	other threads:[~2016-07-14  2:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-14  2:50 yongjie [this message]
2016-07-14 13:44 ` Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468464642-45496-1-git-send-email-yongjiex.gu@intel.com \
    --to=yongjiex.gu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).