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 | ||
---|---|---|
93–94 | This call can be removed now. | |
106–107 | 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: |
@ckennelly:
Removing these calls are causing build failures because the internal-linkage function is no longer referenced anywhere: http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/6480/steps/build%20stage%201/logs/stdio