|
|
8da745 |
From e0bf0252a45a60b9cf4d359c3bf171baed28ba70 Mon Sep 17 00:00:00 2001
|
|
|
8da745 |
From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= <olysonek@redhat.com>
|
|
|
8da745 |
Date: Thu, 9 May 2019 10:23:07 +0200
|
|
|
8da745 |
Subject: [PATCH] functions: Return an ordered cpu list in cpulist_online
|
|
|
8da745 |
MIME-Version: 1.0
|
|
|
8da745 |
Content-Type: text/plain; charset=UTF-8
|
|
|
8da745 |
Content-Transfer-Encoding: 8bit
|
|
|
8da745 |
|
|
|
8da745 |
cpulist_unpack, which is used in the function, returns an ordered cpu
|
|
|
8da745 |
list, however by converting it to a set, the order is lost. Rewrite the
|
|
|
8da745 |
operation in a way that preserves the order.
|
|
|
8da745 |
|
|
|
8da745 |
Resolves: rhbz#1706171
|
|
|
8da745 |
|
|
|
8da745 |
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
|
|
|
8da745 |
---
|
|
|
8da745 |
tuned/profiles/functions/function_cpulist_online.py | 2 +-
|
|
|
8da745 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
8da745 |
|
|
|
8da745 |
diff --git a/tuned/profiles/functions/function_cpulist_online.py b/tuned/profiles/functions/function_cpulist_online.py
|
|
|
8da745 |
index 1badf3d..64d930c 100644
|
|
|
8da745 |
--- a/tuned/profiles/functions/function_cpulist_online.py
|
|
|
8da745 |
+++ b/tuned/profiles/functions/function_cpulist_online.py
|
|
|
8da745 |
@@ -19,4 +19,4 @@ class cpulist_online(base.Function):
|
|
|
8da745 |
return None
|
|
|
8da745 |
cpus = self._cmd.cpulist_unpack(",".join(args))
|
|
|
8da745 |
online = self._cmd.cpulist_unpack(self._cmd.read_file("/sys/devices/system/cpu/online"))
|
|
|
8da745 |
- return ",".join(str(v) for v in set(cpus).intersection(set(online)))
|
|
|
8da745 |
+ return ",".join(str(v) for v in cpus if v in online)
|
|
|
8da745 |
--
|
|
|
8da745 |
2.20.1
|
|
|
8da745 |
|