[PATCH] rteval: kcompile: Use systopology to get a list of cpus on a node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kcompile gets a lists of cpus on a node but doesn't take into account
whether the cpus are online or not.

Instead of using the method in kcompile, use the method in systopology,
since that will consider whether the cpus are online or not.

Reported-by: Valentin Schneider <vschneid@xxxxxxxxxx>
Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>
---
 rteval/modules/loads/kcompile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index 367f8dc1ca86..add0cd86cde4 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -202,7 +202,7 @@ class Kcompile(CommandLineLoad):
         self.cpus = {}
         self.nodes = self.topology.getnodes()
         for n in self.nodes:
-            self.cpus[n] = [int(c.split('/')[-1][3:]) for c in glob.glob('/sys/devices/system/node/node%s/cpu[0-9]*' % n)]
+            self.cpus[n] = self.topology.getcpus(n)
             self.cpus[n].sort()
 
             # if a cpulist was specified, only allow cpus in that list on the node
-- 
2.35.1




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux