Disable huge pages in the TSan shadow regions when no_huge_pages_for_shadow == true (default).
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.
This call can be removed now.
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.