public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kip at thevertigo dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/97329] New: POWER9 default cache and line sizes appear to be wrong Date: Thu, 08 Oct 2020 03:35:42 +0000 [thread overview] Message-ID: <bug-97329-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97329 Bug ID: 97329 Summary: POWER9 default cache and line sizes appear to be wrong Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: kip at thevertigo dot com Target Milestone: --- While investigating the memory hierarchy on my Romulus POWER9 (CPU revision 2.2) I discovered GCC's default L1 cache and line sizes on POWER9 are not correct. I think whoever specified the default cache size of 64KB may not have realized the L1 cache is banked, and not unified. On POWER9 that 64KB is split between separate instructions and data spaces. Only 32KB is actually available for data. GCC's documentation specifies that the l1-cache-size parameter is suppose to refer to data only, but not instructions. Further, the default l1-cache-line-size is wrong. It's currently set at 32 bytes. The correct value is actually four times that at 128 bytes. As things are right now, the resulting generated code may not be properly optimized because the optimizer plans around the wrong parameters. When this happens the generated program may have a higher than necessary cache miss rate. This could be a big deal since the CPU retrieving data from the L1 may only take one or two cycles, but a cache miss could mean several hundred while the block is transferred.
next reply other threads:[~2020-10-08 3:35 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-08 3:35 kip at thevertigo dot com [this message] 2020-10-08 5:31 ` [Bug target/97329] " kip at thevertigo dot com 2020-10-08 5:39 ` kip at thevertigo dot com 2020-10-08 19:41 ` segher at gcc dot gnu.org 2020-10-08 20:10 ` kip at thevertigo dot com 2020-10-08 20:11 ` segher at gcc dot gnu.org 2020-10-08 23:53 ` kip at thevertigo dot com 2020-10-08 23:53 ` kip at thevertigo dot com 2020-10-09 12:55 ` segher at gcc dot gnu.org 2021-03-23 6:54 ` luoxhu at gcc dot gnu.org 2021-03-23 22:44 ` segher at gcc dot gnu.org 2021-03-25 1:05 ` luoxhu at gcc dot gnu.org 2021-03-25 4:53 ` cvs-commit at gcc dot gnu.org 2021-03-25 5:01 ` cvs-commit at gcc dot gnu.org
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=bug-97329-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).