]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.4/perf-test-session-topology-fix-test-on-s390.patch
1bf82cee1350cdaab155beae23601011b5ebbf50
[thirdparty/kernel/stable-queue.git] / queue-4.4 / perf-test-session-topology-fix-test-on-s390.patch
1 From foo@baz Wed Aug 22 10:28:26 CEST 2018
2 From: Thomas Richter <tmricht@linux.ibm.com>
3 Date: Mon, 11 Jun 2018 09:31:53 +0200
4 Subject: perf test session topology: Fix test on s390
5
6 From: Thomas Richter <tmricht@linux.ibm.com>
7
8 [ Upstream commit b930e62ecd362843002bdf84c2940439822af321 ]
9
10 On s390 this test case fails because the socket identifiction numbers
11 assigned to the CPU are higher than the CPU identification numbers.
12
13 F/ix this by adding the platform architecture into the perf data header
14 flag information. This helps identifiing the test platform and handles
15 s390 specifics in process_cpu_topology().
16
17 Before:
18
19 [root@p23lp27 perf]# perf test -vvvvv -F 39
20 39: Session topology :
21 --- start ---
22 templ file: /tmp/perf-test-iUv755
23 socket_id number is too big.You may need to upgrade the perf tool.
24 ---- end ----
25 Session topology: Skip
26 [root@p23lp27 perf]#
27
28 After:
29
30 [root@p23lp27 perf]# perf test -vvvvv -F 39
31 39: Session topology :
32 --- start ---
33 templ file: /tmp/perf-test-8X8VTs
34 CPU 0, core 0, socket 6
35 CPU 1, core 1, socket 3
36 ---- end ----
37 Session topology: Ok
38 [root@p23lp27 perf]#
39
40 Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
41 Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
42 Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
43 Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
44 Fixes: c84974ed9fb6 ("perf test: Add entry to test cpu topology")
45 Link: http://lkml.kernel.org/r/20180611073153.15592-2-tmricht@linux.ibm.com
46 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
47 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
48 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
49 ---
50 tools/perf/tests/topology.c | 1 +
51 1 file changed, 1 insertion(+)
52
53 --- a/tools/perf/tests/topology.c
54 +++ b/tools/perf/tests/topology.c
55 @@ -42,6 +42,7 @@ static int session_write_header(char *pa
56
57 perf_header__set_feat(&session->header, HEADER_CPU_TOPOLOGY);
58 perf_header__set_feat(&session->header, HEADER_NRCPUS);
59 + perf_header__set_feat(&session->header, HEADER_ARCH);
60
61 session->header.data_size += DATA_SIZE;
62