Skip to contentSkip to conversation

cyclictest: Fix help text for '-a' option

PATCH In review Eder Zulian 2 participants 2 messages Oct 14, 2024 – Oct 31, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cyclictest: Fix help text for '-a' option

Fix the help text for '-a' or '--affinity' option.

Tested with the following command (output editted to indicate thread ranking, i.e., Thread 0 is the 1st thread, Thread 1 is the 2nd thread, and so on):

	# cyclictest -t -a3-5,0 -t 5 -D1 -v
	[...]
	Thread 0 using cpu 0.	<-- 1st thread
	Thread 0 Interval: 1500
	Thread 1 using cpu 3.	<-- 2nd thread
	Thread 1 Interval: 2000
	Thread 2 using cpu 4.	<-- 3rd thread
	Thread 2 Interval: 2500
	Thread 3 using cpu 5.	<-- 4th thread
	Thread 3 Interval: 3000
	Thread 4 using cpu 0.	<-- 5th thread
	Thread 4 Interval: 3500
	[...]
---
 src/cyclictest/cyclictest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
src/cyclictest/cyclictest.c +3 -3
index c5c3389..f3ab836 100644
@@ -769,9 +769,9 @@ static void display_help(int error)
 	       "-a [CPUSET] --affinity     Run thread #N on processor #N, if possible, or if CPUSET\n"
 	       "                           given, pin threads to that set of processors in round-\n"
 	       "                           robin order.  E.g. -a 2 pins all threads to CPU 2,\n"
-	       "                           but -a 3-5,0 -t 5 will run the first and fifth\n"
-	       "                           threads on CPU (0),thread #2 on CPU 3, thread #3\n"
-	       "                           on CPU 4, and thread #5 on CPU 5.\n"
+	       "                           but -a 3-5,0 -t 5 will run the first and fifth threads\n"
+	       "                           on CPU 0, the second thread on CPU 3, the third thread\n"
+	       "                           on CPU 4, and the fourth thread on CPU 5.\n"
 	       "-A USEC  --aligned=USEC    align thread wakeups to a specific offset\n"
 	       "-b USEC  --breaktrace=USEC send break trace command when latency > USEC\n"
 	       "-c CLOCK --clock=CLOCK     select clock\n"
Signature · 1 line
2.46.2
#1 lore raw
Quoted 33 lines · Eder Zulian

Fix the help text for '-a' or '--affinity' option.

Tested with the following command (output editted to indicate thread ranking, i.e., Thread 0 is the 1st thread, Thread 1 is the 2nd thread, and so on):

	# cyclictest -t -a3-5,0 -t 5 -D1 -v
	[...]
	Thread 0 using cpu 0.	<-- 1st thread
	Thread 0 Interval: 1500
	Thread 1 using cpu 3.	<-- 2nd thread
	Thread 1 Interval: 2000
	Thread 2 using cpu 4.	<-- 3rd thread
	Thread 2 Interval: 2500
	Thread 3 using cpu 5.	<-- 4th thread
	Thread 3 Interval: 3000
	Thread 4 using cpu 0.	<-- 5th thread
	Thread 4 Interval: 3500
	[...]
---
 src/cyclictest/cyclictest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
src/cyclictest/cyclictest.c +0 -0
index c5c3389..f3ab836 100644
@@ -769,9 +769,9 @@ static void display_help(int error)
 	       "-a [CPUSET] --affinity     Run thread #N on processor #N, if possible, or if CPUSET\n"
 	       "                           given, pin threads to that set of processors in round-\n"

src/cyclictest/cyclictest.c static void display_help(int error) · line 777

Quoted 10 lines
src/cyclictest/cyclictest.c +3 -3
 	       "                           robin order.  E.g. -a 2 pins all threads to CPU 2,\n"
-	       "                           but -a 3-5,0 -t 5 will run the first and fifth\n"
-	       "                           threads on CPU (0),thread #2 on CPU 3, thread #3\n"
-	       "                           on CPU 4, and thread #5 on CPU 5.\n"
+	       "                           but -a 3-5,0 -t 5 will run the first and fifth threads\n"
+	       "                           on CPU 0, the second thread on CPU 3, the third thread\n"
+	       "                           on CPU 4, and the fourth thread on CPU 5.\n"
 	       "-A USEC  --aligned=USEC    align thread wakeups to a specific offset\n"
 	       "-b USEC  --breaktrace=USEC send break trace command when latency > USEC\n"
 	       "-c CLOCK --clock=CLOCK     select clock\n"