diff options
author | John Kacur <jkacur@redhat.com> | 2019-08-14 00:12:35 +0200 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2019-08-14 00:12:35 +0200 |
commit | a3ae50a43f0849de27507cdc47cebeb9d07c8cbf (patch) | |
tree | 2cf7884826aef2ae87d45a3613efc75e056decd6 | |
parent | edba456218fc1e2eab5756a512e62208f62ca70c (diff) | |
download | rt-tests-a3ae50a43f0849de27507cdc47cebeb9d07c8cbf.tar.gz rt-tests-a3ae50a43f0849de27507cdc47cebeb9d07c8cbf.tar.xz |
rt-tests: cyclictest: Without -t default to 1 thread in numa case
Don't ignore -t num when detecting if numa support is available.
Also, don't be too smart about details in the case of numa support
This means, if -t is not specified then the default is 1.
affinity must also be explicily set.
Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r-- | src/cyclictest/cyclictest.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index 83f169d..d101e3d 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -1183,6 +1183,7 @@ static void process_options (int argc, char *argv[], int max_cpus) case 'a': case OPT_AFFINITY: option_affinity = 1; + /* smp sets AFFINITY_USEALL in OPT_SMP */ if (smp) break; if (optarg != NULL) { @@ -1345,15 +1346,11 @@ static void process_options (int argc, char *argv[], int max_cpus) } } - if (!smp) { /* if smp wasn't requested, test for numa automatically */ + /* if smp wasn't requested, test for numa automatically */ + if (!smp) { #ifdef NUMA - if (numa_available() != -1) { + if (numa_available() != -1) numa = 1; - if (setaffinity == AFFINITY_UNSPECIFIED) { - num_threads = max_cpus; - setaffinity = AFFINITY_USEALL; - } - } #else warn("cyclictest was not built with the numa option\n"); numa = 0; |