[PATCH 2/2] rt-tests: cyclictest: Without -t default to 1 thread in numa case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/cyclictest/cyclictest.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 83f169d381b7..d101e3d14854 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;
-- 
2.20.1




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux