public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97329] New: POWER9 default cache and line sizes appear to be wrong
@ 2020-10-08  3:35 kip at thevertigo dot com
  2020-10-08  5:31 ` [Bug target/97329] " kip at thevertigo dot com
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: kip at thevertigo dot com @ 2020-10-08  3:35 UTC (permalink / raw)
  To: gcc-bugs

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.

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

end of thread, other threads:[~2021-03-25  5:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08  3:35 [Bug c/97329] New: POWER9 default cache and line sizes appear to be wrong kip at thevertigo dot com
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

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).