diff mbox series

cyclictest: Fix help text for '-a' option

Message ID 20241014215946.1833576-1-ezulian@redhat.com
State New
Headers show
Series cyclictest: Fix help text for '-a' option | expand

Commit Message

Eder Zulian Oct. 14, 2024, 9:59 p.m. UTC
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
	[...]

Signed-off-by: Eder Zulian <ezulian@redhat.com>
---
 src/cyclictest/cyclictest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

John Kacur Oct. 31, 2024, 9:36 p.m. UTC | #1
On Mon, 14 Oct 2024, Eder Zulian wrote:

> 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
> 	[...]
> 
> Signed-off-by: Eder Zulian <ezulian@redhat.com>
> ---
>  src/cyclictest/cyclictest.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
> index c5c3389..f3ab836 100644
> --- a/src/cyclictest/cyclictest.c
> +++ b/src/cyclictest/cyclictest.c
> @@ -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"
> -- 

Signed-off-by: John Kacur <jkacur@redhat.com>
diff mbox series

Patch

diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index c5c3389..f3ab836 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -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"