linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v1 1/1] perf test: Increase load in lock contention test on low-activity systems
@ 2025-07-09 20:38 Jan Polensky
  2025-07-10  5:47 ` Thomas Richter
  2025-07-16 19:50 ` Namhyung Kim
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Polensky @ 2025-07-09 20:38 UTC (permalink / raw)
  To: adrian.hunter, irogers, namhyung; +Cc: linux-perf-users

On low-activity systems, the 'kernel lock contention analysis test'
often fails due to insufficient system load. To address this, the test
now increases load by using multiple groups and threads in 'perf bench
sched messaging', scaled to the number of available CPUs.

Signed-off-by: Jan Polensky <japo@linux.ibm.com>
---
 tools/perf/tests/shell/lock_contention.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/tests/shell/lock_contention.sh b/tools/perf/tests/shell/lock_contention.sh
index 30d195d4c62f..e859e1503b5c 100755
--- a/tools/perf/tests/shell/lock_contention.sh
+++ b/tools/perf/tests/shell/lock_contention.sh
@@ -44,7 +44,8 @@ check() {
 test_record()
 {
 	echo "Testing perf lock record and perf lock contention"
-	perf lock record -o ${perfdata} -- perf bench sched messaging > /dev/null 2>&1
+	perf lock record -o ${perfdata} -- perf bench sched messaging \
+		--group "$(nproc)" --thread "$(nproc)" > /dev/null 2>&1
 	# the output goes to the stderr and we expect only 1 output (-E 1)
 	perf lock contention -i ${perfdata} -E 1 -q 2> ${result}
 	if [ "$(cat "${result}" | wc -l)" != "1" ]; then
--
2.48.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-07-26  5:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09 20:38 [RFC PATCH v1 1/1] perf test: Increase load in lock contention test on low-activity systems Jan Polensky
2025-07-10  5:47 ` Thomas Richter
2025-07-16 19:50 ` Namhyung Kim
2025-07-25 16:23   ` Jan Polensky
2025-07-26  5:35     ` Namhyung Kim

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).