Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove hardware_destructive_interference_size to silence interference-size warning #41

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

spoonincode
Copy link
Member

with gcc13 there are a deluge of warnings,

libraries/chain/include/eosio/chain/thread_utils.hpp:28:15: warning: use of ‘std::hardware_destructive_interference_size’ [-Winterference-size]
   28 |       alignas(hardware_destructive_interference_size)
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libraries/chain/include/eosio/chain/thread_utils.hpp:28:15: note: its value can vary between compiler versions or with different ‘-mtune’ or ‘-mcpu’ flags
libraries/chain/include/eosio/chain/thread_utils.hpp:28:15: note: if this use is part of a public ABI, change it to instead use a constant variable you define
libraries/chain/include/eosio/chain/thread_utils.hpp:28:15: note: the default value for the current CPU tuning is 64 bytes
libraries/chain/include/eosio/chain/thread_utils.hpp:28:15: note: you can stabilize this value with ‘--param hardware_destructive_interference_size=64’, or disable this warning with ‘-Wno-interference-size’

For now, remove the alignas(hardware_destructive_interference_size) as part of large_atomic as suggested in #34 (comment)

@greg7mdp
Copy link
Contributor

Facebook Folly uses a hard-coded value to avoid this warning iirc

@spoonincode spoonincode merged commit 21e66b5 into savanna Apr 16, 2024
36 checks passed
@spoonincode spoonincode deleted the remove_hdis branch April 16, 2024 21:39
@ericpassmore
Copy link
Contributor

Note:start
group: CLEANCODE
category: INTERNALS
summary: Change to silence many interference-size warnings that arrived with usage of gcc13
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants