Patch "perf tests: Make "test data symbol" more robust on Neoverse N1" has been added to the 6.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    perf tests: Make "test data symbol" more robust on Neoverse N1

to the 6.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-tests-make-test-data-symbol-more-robust-on-neov.patch
and it can be found in the queue-6.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 45fdb7c694c73ddf13bd4fed54a9b77c250ee71a
Author: James Clark <james.clark@xxxxxxx>
Date:   Wed Apr 10 11:34:52 2024 +0100

    perf tests: Make "test data symbol" more robust on Neoverse N1
    
    [ Upstream commit 256ef072b3842273ce703db18b603b051aca95fe ]
    
    To prevent anyone from seeing a test failure appear as a regression and
    thinking that it was caused by their code change, insert some noise into
    the loop which makes it immune to sampling bias issues (errata 1694299).
    
    The "test data symbol" test can fail with any unrelated change that
    shifts the loop into an unfortunate position in the Perf binary which is
    almost impossible to debug as the root cause of the test failure.
    Ultimately it's caused by the referenced errata.
    
    Fixes: 60abedb8aa902b06 ("perf test: Introduce script for data symbol testing")
    Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>
    Signed-off-by: James Clark <james.clark@xxxxxxx>
    Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>
    Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
    Cc: Athira Rajeev <atrajeev@xxxxxxxxxxxxxxxxxx>
    Cc: Ingo Molnar <mingo@xxxxxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
    Cc: Leo Yan <leo.yan@xxxxxxxxx>
    Cc: Mark Rutland <mark.rutland@xxxxxxx>
    Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
    Cc: Spoorthy S <spoorts2@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240410103458.813656-2-james.clark@xxxxxxx
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/tests/workloads/datasym.c b/tools/perf/tests/workloads/datasym.c
index ddd40bc63448a..8e08fc75a973e 100644
--- a/tools/perf/tests/workloads/datasym.c
+++ b/tools/perf/tests/workloads/datasym.c
@@ -16,6 +16,22 @@ static int datasym(int argc __maybe_unused, const char **argv __maybe_unused)
 {
 	for (;;) {
 		buf1.data1++;
+		if (buf1.data1 == 123) {
+			/*
+			 * Add some 'noise' in the loop to work around errata
+			 * 1694299 on Arm N1.
+			 *
+			 * Bias exists in SPE sampling which can cause the load
+			 * and store instructions to be skipped entirely. This
+			 * comes and goes randomly depending on the offset the
+			 * linker places the datasym loop at in the Perf binary.
+			 * With an extra branch in the middle of the loop that
+			 * isn't always taken, the instruction stream is no
+			 * longer a continuous repeating pattern that interacts
+			 * badly with the bias.
+			 */
+			buf1.data1++;
+		}
 		buf1.data2 += buf1.data1;
 	}
 	return 0;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux