All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] perf test lock_contention.sh: Skip test if the number of CPUs is low
@ 2023-09-12 12:19 vmolnaro
  2023-09-12 12:19 ` [PATCH 2/2] perf test stat+shadow_stat.sh: Add threshold for rounding errors vmolnaro
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: vmolnaro @ 2023-09-12 12:19 UTC (permalink / raw)
  To: linux-perf-users, acme, acme; +Cc: mpetlan

From: Veronika Molnarova <vmolnaro@redhat.com>

Machines with less then 4 CPUs weren't consistently triggering lock
events required for the test.

Skip the test on those machines. The limit of 4 CPUs is set as it
generates around 100 lock events for a test.
---
 tools/perf/tests/shell/lock_contention.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/tests/shell/lock_contention.sh b/tools/perf/tests/shell/lock_contention.sh
index f2cc187b618..1d3598ff6a0 100755
--- a/tools/perf/tests/shell/lock_contention.sh
+++ b/tools/perf/tests/shell/lock_contention.sh
@@ -31,6 +31,12 @@ check() {
 		echo "[Skip] No lock contention tracepoints"
 		err=2
 		exit
+	fi 
+
+	if [ `nproc` -lt 4 ]; then
+		echo "[Skip] Low number of CPUs (`nproc`), lock event cannot be triggered certainly"
+		err=2
+		exit
 	fi
 }
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH 1/2] perf test lock_contention.sh: Skip test if the number of CPUs is low
@ 2023-08-21  9:00 vmolnaro
  2023-08-21  9:00 ` [PATCH 2/2] perf test stat+shadow_stat.sh: Add threshold for rounding errors vmolnaro
  0 siblings, 1 reply; 9+ messages in thread
From: vmolnaro @ 2023-08-21  9:00 UTC (permalink / raw)
  To: linux-perf-users, acme, acme; +Cc: mpetlan

From: notValord <v.m.veverka@gmail.com>

Machines with less then 4 CPUs weren't consistently triggering lock
events required for the test.

Skip the test on those machines. The limit of 4 CPUs is set as it
generates around 100 lock events for a test.
---
 tools/perf/tests/shell/lock_contention.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/perf/tests/shell/lock_contention.sh b/tools/perf/tests/shell/lock_contention.sh
index f2cc187b618..1d3598ff6a0 100755
--- a/tools/perf/tests/shell/lock_contention.sh
+++ b/tools/perf/tests/shell/lock_contention.sh
@@ -31,6 +31,12 @@ check() {
 		echo "[Skip] No lock contention tracepoints"
 		err=2
 		exit
+	fi 
+
+	if [ `nproc` -lt 4 ]; then
+		echo "[Skip] Low number of CPUs (`nproc`), lock event cannot be triggered certainly"
+		err=2
+		exit
 	fi
 }
 
-- 
2.41.0


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

end of thread, other threads:[~2023-09-12 21:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-12 12:19 [PATCH 1/2] perf test lock_contention.sh: Skip test if the number of CPUs is low vmolnaro
2023-09-12 12:19 ` [PATCH 2/2] perf test stat+shadow_stat.sh: Add threshold for rounding errors vmolnaro
2023-09-12 12:22   ` Michael Petlan
2023-09-12 21:01   ` Arnaldo Carvalho de Melo
2023-09-12 12:21 ` [PATCH 1/2] perf test lock_contention.sh: Skip test if the number of CPUs is low Michael Petlan
2023-09-12 20:57 ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2023-08-21  9:00 vmolnaro
2023-08-21  9:00 ` [PATCH 2/2] perf test stat+shadow_stat.sh: Add threshold for rounding errors vmolnaro
2023-08-23  9:02   ` Michael Petlan
2023-09-06 16:51   ` Arnaldo Carvalho de Melo

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.