Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue: 3884801 Check for resident hugepages to avoid SIGBUS
In a containerized environment mmap() beyond the hugepages limit can be successful, but a further memory access triggers SIGBUS and terminates the process. Check that all the allocated hugepages are resident with mincore() to avoid the SIGBUS issue. Cost of the feature depends on the allocation size and hugepage size: - 32GB with 2MB pages takes 4400 us - 32GB with 1GB pages takes 11 us - 32MB with 2MB pages takes 5-6 us We expect a big memory preallocation at the start (2GB by default) and rare 32MB allocations during warmup period. Therefore, this feature can add several additional 5us latency spikes during warmup period. Signed-off-by: Dmytro Podgornyi <[email protected]>
- Loading branch information