Thread (10 messages) 10 messages, 3 authors, 2021-05-22

Re: [PATCH v4 2/2] cyclictest: Add --mainaffinity=[CPUSET] option.

From: Daniel Wagner <hidden>
Date: 2021-05-19 15:55:51

Hi Jonathan,

On Tue, May 18, 2021 at 10:37:12AM +0200, Jonathan Schwender wrote:
quoted hunk ↗ jump to hunk
This allows the user to specify a separate cpuset for the main pid,
e.g. on a housekeeping CPU.
If --mainaffinity is not specified, but --affinity is, then the
current behaviour is preserved and the main thread is bound
to the cpuset specified by --affinity

Signed-off-by: Jonathan Schwender <redacted>
---
 src/cyclictest/cyclictest.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 3bab3b2..a2103c7 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -836,6 +836,8 @@ static void display_help(int error)
 	       "	 --laptop	   Save battery when running cyclictest\n"
 	       "			   This will give you poorer realtime results\n"
 	       "			   but will not drain your battery so quickly\n"
+	       "         --mainaffinity=[CPUSET]  Run the main thread on CPU #N. This only affects\n"
+	       "                           the main thread and not the measurement threads\n"
The main thread is allowed to run on any CPU which CPUSET specifies. CPU
#N does not really make sense.

While at it, please update man page accordingly.

Thanks,
Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help