All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Richter <tmricht@linux.ibm.com>
To: irogers@google.com, Arnaldo Carvalho de Melo <acme@kernel.org>,
	"linux-perf-use." <linux-perf-users@vger.kernel.org>
Cc: Heiko Carstens <hca@linux.ibm.com>,
	Sumanth Korikkar <sumanthk@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>
Subject: Perf test 7 fails on s390 (perf expr: Add metric literals for topology)
Date: Mon, 22 Nov 2021 17:04:42 +0100	[thread overview]
Message-ID: <56480f10-4b9f-e88f-7c67-9158868a8e44@linux.ibm.com> (raw)

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

             reply	other threads:[~2021-11-22 16:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 16:04 Thomas Richter [this message]
2021-11-22 16:48 ` Perf test 7 fails on s390 (perf expr: Add metric literals for topology) Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56480f10-4b9f-e88f-7c67-9158868a8e44@linux.ibm.com \
    --to=tmricht@linux.ibm.com \
    --cc=acme@kernel.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=irogers@google.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sumanthk@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.