Skip to content

Conversation

mcfi
Copy link
Contributor

@mcfi mcfi commented Oct 13, 2025

Summary:
X-link: facebook/folly#2521

sysconf on MacOS does not support _SC_LEVEL1_DCACHE_LINESIZE. We fix the build issue by just reading folly::hardware_destructive_interference_size, which is guaranteed to be a multiple of a cache line size. Note that we don't have to retrieve the accurate cache line size, just a multiple of its size is good enough.

Differential Revision: D84522796

Copy link

meta-codesync bot commented Oct 13, 2025

@mcfi has exported this pull request. If you are a Meta employee, you can view the originating Diff in D84522796.

@meta-cla meta-cla bot added the CLA Signed label Oct 13, 2025
mcfi added a commit to mcfi/folly that referenced this pull request Oct 13, 2025
Summary:
X-link: facebook/hhvm#9651


sysconf on MacOS does not support _SC_LEVEL1_DCACHE_LINESIZE. We fix the build issue by just reading folly::hardware_destructive_interference_size, which is guaranteed to be a multiple of a cache line size. Note that we don't have to retrieve the accurate cache line size, just a multiple of its size is good enough.

Differential Revision: D84522796
Summary:

X-link: facebook/folly#2521

sysconf on MacOS does not support _SC_LEVEL1_DCACHE_LINESIZE. We fix the build issue by just reading folly::hardware_destructive_interference_size, which is guaranteed to be a multiple of a cache line size. Note that we don't have to retrieve the accurate cache line size, just a multiple of its size is good enough.

Differential Revision: D84522796
@mcfi mcfi force-pushed the export-D84522796 branch from 032d657 to 6e7c47c Compare October 13, 2025 20:25
meta-codesync bot pushed a commit to facebook/folly that referenced this pull request Oct 14, 2025
Summary:
X-link: facebook/hhvm#9651

Pull Request resolved: #2521

sysconf on MacOS does not support _SC_LEVEL1_DCACHE_LINESIZE. We fix the build issue by just reading folly::hardware_destructive_interference_size, which is guaranteed to be a multiple of a cache line size. Note that we don't have to retrieve the accurate cache line size, just a multiple of its size is good enough.

Reviewed By: yfeldblum

Differential Revision: D84522796

fbshipit-source-id: 9a8b941d62f89d00b0b4eb9566bc3676d858300a
@meta-codesync meta-codesync bot closed this in a853722 Oct 14, 2025
Copy link

meta-codesync bot commented Oct 14, 2025

This pull request has been merged in a853722.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants