From: John Kacur <jkacur@redhat.com>
To: rt-users <linux-rt-users@vger.kernel.org>
Cc: Clark Williams <williams@redhat.com>, John Kacur <jkacur@redhat.com>
Subject: [PATCH 2/2] rt-tests: cyclictest: Without -t default to 1 thread in numa case
Date: Wed, 14 Aug 2019 15:50:09 +0200 [thread overview]
Message-ID: <20190814135009.5954-2-jkacur@redhat.com> (raw)
In-Reply-To: <20190814135009.5954-1-jkacur@redhat.com>
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>
---
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
prev parent reply other threads:[~2019-08-14 13:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 13:50 [PATCH 1/2] rt-tests: hwlatdetect: Remove kmodule options and clean-up help John Kacur
2019-08-14 13:50 ` John Kacur [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190814135009.5954-2-jkacur@redhat.com \
--to=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).