|
|
1043e6 |
From 795433f50f20ef7598db5cfe991b5386e4080d41 Mon Sep 17 00:00:00 2001
|
|
|
1043e6 |
From: Marcelo Tosatti <mtosatti@redhat.com>
|
|
|
1043e6 |
Date: Fri, 28 Jan 2022 15:39:59 -0300
|
|
|
1043e6 |
Subject: [PATCH 2/2] rt-numa: ignore runtime cpumask if -a CPULIST is
|
|
|
1043e6 |
specified
|
|
|
1043e6 |
|
|
|
1043e6 |
When using isolcpus kernel command line option, the CPUs
|
|
|
1043e6 |
specified at isolcpus= are not part of the run time environment
|
|
|
1043e6 |
cpumask.
|
|
|
1043e6 |
|
|
|
1043e6 |
This causes "cyclictest -a isolatedcpus" to fail with:
|
|
|
1043e6 |
|
|
|
1043e6 |
WARN: Couldn't setaffinity in main thread: Invalid argument
|
|
|
1043e6 |
FATAL: No allowable cpus to run on
|
|
|
1043e6 |
# /dev/cpu_dma_latency set to 0us
|
|
|
1043e6 |
|
|
|
1043e6 |
To fix this, ignore the runtime cpumask if neither "+", "!"
|
|
|
1043e6 |
are specified in the cpu list string.
|
|
|
1043e6 |
|
|
|
1043e6 |
Suggested by Sebastian Andrzej Siewior.
|
|
|
1043e6 |
|
|
|
1043e6 |
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
|
|
|
1043e6 |
|
|
|
1043e6 |
v2: fix changelog typo
|
|
|
1043e6 |
v3: simplified version (John Kacur)
|
|
|
1043e6 |
|
|
|
1043e6 |
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
|
1043e6 |
---
|
|
|
1043e6 |
src/lib/rt-numa.c | 3 ++-
|
|
|
1043e6 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
1043e6 |
|
|
|
1043e6 |
diff --git a/src/lib/rt-numa.c b/src/lib/rt-numa.c
|
|
|
1043e6 |
index ee5ab99684d8..3eead80c3b2b 100644
|
|
|
1043e6 |
--- a/src/lib/rt-numa.c
|
|
|
1043e6 |
+++ b/src/lib/rt-numa.c
|
|
|
1043e6 |
@@ -131,7 +131,8 @@ int parse_cpumask(char *str, int max_cpus, struct bitmask **cpumask)
|
|
|
1043e6 |
return 0;
|
|
|
1043e6 |
}
|
|
|
1043e6 |
|
|
|
1043e6 |
- use_current_cpuset(max_cpus, mask);
|
|
|
1043e6 |
+ if (strchr(str, '!') != NULL || strchr(str, '+') != NULL)
|
|
|
1043e6 |
+ use_current_cpuset(max_cpus, mask);
|
|
|
1043e6 |
*cpumask = mask;
|
|
|
1043e6 |
|
|
|
1043e6 |
return 0;
|
|
|
1043e6 |
--
|
|
|
1043e6 |
2.34.1
|
|
|
1043e6 |
|