36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
|
From da95d97bafc9b0740a83da93ba304345ab3c157f Mon Sep 17 00:00:00 2001
|
||
|
From: John Kacur <jkacur@redhat.com>
|
||
|
Date: Fri, 29 Apr 2022 16:06:01 -0400
|
||
|
Subject: [PATCH 08/17] rteval: kcompile: Use systopology to get a list of cpus
|
||
|
on a node
|
||
|
|
||
|
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@redhat.com>
|
||
|
Tested-by: Valentin Schneider <vschneid@redhat.com>
|
||
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||
|
---
|
||
|
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.36.1
|
||
|
|