Disable huge pages in the TSan shadow regions when no_huge_pages_for_shadow == true (default).
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I wonder if it would pay to selectively apply this for the parts of the shadow that correspond to shared library mappings.
Otherwise we are losing the benefits of huge pages on the heap, which should have a pretty dense shadow.
@dvyukov
compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp | ||
---|---|---|
94 | This call can be removed now. | |
108 | same |
Hard to say without any data.
I know we are close to RAM limits in lots of our use cases, so if we trade a bit memory for performance, we sure will get lots of new failures without any simple ways to resolve them.
Tsan may flush shadow pretty aggressively. Consider: heap may be "dense", but now if we have just 1K region that is not used between 2 flushes, we won't page shadow for it in. With huge pages we may page in way more.
compiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp | ||
---|---|---|
93 | @ckennelly: |
clang-format: please reformat the code