Patch "perf test: Remove atomics from test_loop to avoid test failures" has been added to the 6.7-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 test: Remove atomics from test_loop to avoid test failures

to the 6.7-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-test-remove-atomics-from-test_loop-to-avoid-tes.patch
and it can be found in the queue-6.7 subdirectory.

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



commit f92439544c236b2cc790ed6a3d001f902155556f
Author: Nick Forrington <nick.forrington@xxxxxxx>
Date:   Thu Nov 2 16:22:24 2023 +0000

    perf test: Remove atomics from test_loop to avoid test failures
    
    [ Upstream commit 72b4ca7e993e94f09bcf6d19fc385a2e8060c71f ]
    
    The current use of atomics can lead to test failures, as tests (such as
    tests/shell/record.sh) search for samples with "test_loop" as the
    top-most stack frame, but find frames related to the atomic operation
    (e.g. __aarch64_ldadd4_relax).
    
    This change simply removes the "count" variable, as it is not necessary.
    
    Fixes: 1962ab6f6e0b39e4 ("perf test workload thloop: Make count increments atomic")
    Reviewed-by: James Clark <james.clark@xxxxxxx>
    Signed-off-by: Nick Forrington <nick.forrington@xxxxxxx>
    Acked-by: Leo Yan <leo.yan@xxxxxxxxxx>
    Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
    Cc: Ian Rogers <irogers@xxxxxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Mark Rutland <mark.rutland@xxxxxxx>
    Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231102162225.50028-1-nick.forrington@xxxxxxx
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/tests/workloads/thloop.c b/tools/perf/tests/workloads/thloop.c
index af05269c2eb8..457b29f91c3e 100644
--- a/tools/perf/tests/workloads/thloop.c
+++ b/tools/perf/tests/workloads/thloop.c
@@ -7,7 +7,6 @@
 #include "../tests.h"
 
 static volatile sig_atomic_t done;
-static volatile unsigned count;
 
 /* We want to check this symbol in perf report */
 noinline void test_loop(void);
@@ -19,8 +18,7 @@ static void sighandler(int sig __maybe_unused)
 
 noinline void test_loop(void)
 {
-	while (!done)
-		__atomic_fetch_add(&count, 1, __ATOMIC_RELAXED);
+	while (!done);
 }
 
 static void *thfunc(void *arg)




[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