1

I am suspecting cache latency issues due to constant data (or same data across multiprocessor caches) being churned up in the cache coherence protocols. Is there a way to specify specific data as constant so as to avoid snooping or such messages being passed around caches for that data?

  • Typically, this snooping is done as part of writing to memory. Multiple reading processors should be ok, as long as your data lives in a cache line that has no writing (or at most one writing processor). A large table that is only read and not written should be fine for multiple processor usage. See here. – Erik Eidt Jan 28 '19 at 14:59
  • Also, see global-initialized-variables-declared-as-const-go-to-text-segment, as putting data into the text segment will ensure both that it cannot be written, and that it doesn't mingle with data that may be written. – Erik Eidt Jan 28 '19 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.