All of lore.kernel.org
 help / color / mirror / Atom feed
* Perf test 7 fails on s390 (perf expr: Add metric literals for topology)
@ 2021-11-22 16:04 Thomas Richter
  2021-11-22 16:48 ` Ian Rogers
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Richter @ 2021-11-22 16:04 UTC (permalink / raw)
  To: irogers, Arnaldo Carvalho de Melo, linux-perf-use.
  Cc: Heiko Carstens, Sumanth Korikkar, Sven Schnelle, Vasily Gorbik

Commit fdf1e29b6118 ("perf expr: Add metric literals for topology.")
fails on s390:
 
 # ./perf test -Fv 7
   ...
 # FAILED tests/expr.c:173 #num_dies >= #num_packages
   ---- end ----
   Simple expression parser: FAILED!
 #                    
Investigating this issue leads to function:
   static bool has_die_topology(void)
   {                                
        char filename[MAXPATHLEN];
        struct utsname uts;
                                                
        if (uname(&uts) < 0)    
                return false;

        if (strncmp(uts.machine, "x86_64", 6)) 
                return false;  
                                                             
        ....
   }
which always return false on s390.
When I get this right, there is no build up of CPU topology with
dies on s390. The the #num_dies value in above test is always zero
and lower than the #num_packages field.

I am also suprised by the architecture specific code in a common
code function. Wouldn't it be better to define a weak function with
archticture specfic overrides?

Is this intended?
What is the recommended approach for other architectures?
Should I skip this test on s390?
Should s390 invent die for CPUs mapping?

Thanks a lot for your help and advice.

-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294

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

end of thread, other threads:[~2021-11-22 16:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 16:04 Perf test 7 fails on s390 (perf expr: Add metric literals for topology) Thomas Richter
2021-11-22 16:48 ` Ian Rogers

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.