All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Mathieu Desnoyers <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: davejwatson@fb.com, mingo@kernel.org, cl@linux.com,
	linux-kernel@vger.kernel.org, linux@arm.linux.org.uk,
	mathieu.desnoyers@efficios.com, rostedt@goodmis.org,
	joelaf@google.com, catalin.marinas@arm.com,
	mtk.manpages@gmail.com, luto@amacapital.net,
	boqun.feng@gmail.com, pjt@google.com, bmaurer@fb.com,
	shuah@kernel.org, paulmck@linux.vnet.ibm.com,
	akpm@linux-foundation.org, will.deacon@arm.com,
	torvalds@linux-foundation.org, tglx@linutronix.de,
	peterz@infradead.org, hpa@zytor.com, josh@joshtriplett.org
Subject: [tip:core/rseq] rseq/selftests: Adapt number of threads to the number of detected CPUs
Date: Fri, 19 Apr 2019 03:46:00 -0700	[thread overview]
Message-ID: <tip-03a33ecc26af28ca9535de2b0612c54deafa9728@git.kernel.org> (raw)
In-Reply-To: <20190305194755.2602-4-mathieu.desnoyers@efficios.com>

Commit-ID:  03a33ecc26af28ca9535de2b0612c54deafa9728
Gitweb:     https://git.kernel.org/tip/03a33ecc26af28ca9535de2b0612c54deafa9728
Author:     Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
AuthorDate: Tue, 5 Mar 2019 14:47:55 -0500
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 19 Apr 2019 12:42:14 +0200

rseq/selftests: Adapt number of threads to the number of detected CPUs

On smaller systems, running a test with 200 threads can take a long
time on machines with smaller number of CPUs.

Detect the number of online CPUs at test runtime, and multiply that
by 6 to have 6 rseq threads per CPU preempting each other.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Ben Maurer <bmaurer@fb.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chris Lameter <cl@linux.com>
Cc: Dave Watson <davejwatson@fb.com>
Cc: Joel Fernandes <joelaf@google.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-api@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Link: http://lkml.kernel.org/r/20190305194755.2602-4-mathieu.desnoyers@efficios.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 tools/testing/selftests/rseq/run_param_test.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/rseq/run_param_test.sh b/tools/testing/selftests/rseq/run_param_test.sh
index 3acd6d75ff9f..e426304fd4a0 100755
--- a/tools/testing/selftests/rseq/run_param_test.sh
+++ b/tools/testing/selftests/rseq/run_param_test.sh
@@ -1,6 +1,8 @@
 #!/bin/bash
 # SPDX-License-Identifier: GPL-2.0+ or MIT
 
+NR_CPUS=`grep '^processor' /proc/cpuinfo | wc -l`
+
 EXTRA_ARGS=${@}
 
 OLDIFS="$IFS"
@@ -28,15 +30,16 @@ IFS="$OLDIFS"
 
 REPS=1000
 SLOW_REPS=100
+NR_THREADS=$((6*${NR_CPUS}))
 
 function do_tests()
 {
 	local i=0
 	while [ "$i" -lt "${#TEST_LIST[@]}" ]; do
 		echo "Running test ${TEST_NAME[$i]}"
-		./param_test ${TEST_LIST[$i]} -r ${REPS} ${@} ${EXTRA_ARGS} || exit 1
+		./param_test ${TEST_LIST[$i]} -r ${REPS} -t ${NR_THREADS} ${@} ${EXTRA_ARGS} || exit 1
 		echo "Running compare-twice test ${TEST_NAME[$i]}"
-		./param_test_compare_twice ${TEST_LIST[$i]} -r ${REPS} ${@} ${EXTRA_ARGS} || exit 1
+		./param_test_compare_twice ${TEST_LIST[$i]} -r ${REPS} -t ${NR_THREADS} ${@} ${EXTRA_ARGS} || exit 1
 		let "i++"
 	done
 }

  parent reply	other threads:[~2019-04-19 19:06 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-05 19:47 [PATCH for 5.1 0/3] Restartable Sequences updates for 5.1 Mathieu Desnoyers
2019-03-05 19:47 ` Mathieu Desnoyers
2019-03-05 19:47 ` [PATCH for 5.1 1/3] rseq: cleanup: Reflect removal of event counter in comments Mathieu Desnoyers
2019-03-05 19:47   ` Mathieu Desnoyers
2019-04-19 10:43   ` [tip:core/rseq] rseq: Clean up comments by reflecting removal of event counter tip-bot for Mathieu Desnoyers
2019-03-05 19:47 ` [PATCH for 5.1 2/3] rseq: cleanup: remove rseq_len from task_struct Mathieu Desnoyers
2019-03-05 19:47   ` Mathieu Desnoyers
2019-04-19 10:43   ` [tip:core/rseq] rseq: Remove superfluous " tip-bot for Mathieu Desnoyers
2019-03-05 19:47 ` [PATCH for 5.1 3/3] rseq/selftests: Adapt number of threads to the number of detected cpus Mathieu Desnoyers
2019-03-05 19:47   ` Mathieu Desnoyers
2019-03-05 19:47   ` Mathieu Desnoyers
2019-03-05 19:47   ` mathieu.desnoyers
2019-04-19 10:38   ` Ingo Molnar
2019-04-19 10:38     ` Ingo Molnar
2019-04-19 10:38     ` Ingo Molnar
2019-04-19 10:38     ` mingo
2019-04-19 12:41     ` Mathieu Desnoyers
2019-04-19 12:41       ` Mathieu Desnoyers
2019-04-19 12:41       ` Mathieu Desnoyers
2019-04-19 12:41       ` mathieu.desnoyers
2019-04-19 12:55       ` Mathieu Desnoyers
2019-04-19 12:55         ` Mathieu Desnoyers
2019-04-19 12:55         ` Mathieu Desnoyers
2019-04-19 12:55         ` mathieu.desnoyers
2019-04-19 13:42         ` Mathieu Desnoyers
2019-04-19 13:42           ` Mathieu Desnoyers
2019-04-19 13:42           ` Mathieu Desnoyers
2019-04-19 13:42           ` mathieu.desnoyers
2019-04-19 13:48           ` Mathieu Desnoyers
2019-04-19 13:48             ` Mathieu Desnoyers
2019-04-19 13:48             ` Mathieu Desnoyers
2019-04-19 13:48             ` mathieu.desnoyers
2019-04-19 14:17             ` shuah
2019-04-19 14:17               ` shuah
2019-04-19 14:17               ` shuah
2019-04-19 14:17               ` shuah
2019-04-19 14:40               ` Mathieu Desnoyers
2019-04-19 14:40                 ` Mathieu Desnoyers
2019-04-19 14:40                 ` Mathieu Desnoyers
2019-04-19 14:40                 ` mathieu.desnoyers
2019-04-19 18:57                 ` shuah
2019-04-19 18:57                   ` shuah
2019-04-19 18:57                   ` shuah
2019-04-19 18:57                   ` shuah
2019-04-19 20:59                   ` Mathieu Desnoyers
2019-04-19 20:59                     ` Mathieu Desnoyers
2019-04-19 20:59                     ` Mathieu Desnoyers
2019-04-19 20:59                     ` mathieu.desnoyers
2019-04-19 21:03                     ` shuah
2019-04-19 21:03                       ` shuah
2019-04-19 21:03                       ` shuah
2019-04-19 21:03                       ` shuah
2019-04-19 10:44   ` [tip:core/rseq] " tip-bot for Mathieu Desnoyers
2019-04-19 10:46   ` tip-bot for Mathieu Desnoyers [this message]
2019-03-05 20:18 ` [PATCH for 5.1 0/3] Restartable Sequences updates for 5.1 Mathieu Desnoyers
2019-03-05 20:18   ` Mathieu Desnoyers
2019-03-05 21:58   ` Peter Zijlstra
2019-03-05 21:58     ` Peter Zijlstra
2019-03-05 22:32     ` Mathieu Desnoyers
2019-03-05 22:32       ` Mathieu Desnoyers
2019-03-06  8:21       ` Peter Zijlstra
2019-03-06  8:21         ` Peter Zijlstra
2019-03-06  8:30       ` Peter Zijlstra
2019-03-06  8:30         ` Peter Zijlstra
2019-03-06 17:00         ` Mathieu Desnoyers
2019-03-06 17:00           ` Mathieu Desnoyers
2019-03-05 21:49 ` Peter Zijlstra
2019-03-05 21:49   ` Peter Zijlstra
2019-04-19 10:41 ` Ingo Molnar
2019-04-19 10:41   ` Ingo Molnar
2019-04-19 12:42   ` Mathieu Desnoyers
2019-04-19 12:42     ` Mathieu Desnoyers

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=tip-03a33ecc26af28ca9535de2b0612c54deafa9728@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=bmaurer@fb.com \
    --cc=boqun.feng@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=cl@linux.com \
    --cc=davejwatson@fb.com \
    --cc=hpa@zytor.com \
    --cc=joelaf@google.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=luto@amacapital.net \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.