rteval: kcompile: Use systopology to get a list of cpus on a node
PATCH 1/1 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.
--- rteval/modules/loads/kcompile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rteval/modules/loads/kcompile.py +1 -1
@@ -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
Signature · 1 line
2.35.1
Quoted 8 lines · John Kacur
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 <[email protected]>Signed-off-by John Kacur <[email protected]>
Quoted 19 lines
--- rteval/modules/loads/kcompile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)rteval/modules/loads/kcompile.py +1
-2@@ -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
Quoted 28 lines · Valentin Schneider
Quoted 8 lines · John Kacur
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 <[email protected]>Signed-off-by John Kacur <[email protected]>Tested-by Valentin Schneider <[email protected]>Quoted 16 lines
--- rteval/modules/loads/kcompile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)rteval/modules/loads/kcompile.py +1
-1@@ -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()
Quoted 5 lines
Quoted 3 lines
rteval/modules/loads/kcompile.py +0
-1# if a cpulist was specified, only allow cpus in that list on the node --2.35.1
I added your Tested-by: to the commit.
Thanks for testing!
John