[lld] [llvm] [lld][MachO] Follow-up to use madvise() for threaded file page-in. (PR #157917)

John Holdsworth via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 20 07:33:45 PDT 2025


johnno1962 wrote:

Thank you @DavidSpickett for intervening. I've updated this PR to merge with your changes. The problems with this change (the two PRs) are that a test was added which doesn't exercise a typical usage pattern and results in the intermittent asan failure. This PR should resolve that two ways by moving to use madvise() instead of some hand rolled code on a background thread and by introducing a flag to cause processing on the background thread to finish preventing it overrunning. There is also the change that for a build not including threading the new code will not be included. The final change I included is to make the error when the --read-workers flag is used a warning to be able to pass tests in this case. I've removed the `#if NDEBUG` conditionals as I was asked at one point to keep conditionals to a minimum and I would rather see the benchmarking code stay in as it is useful for release builds. Remember this is not on the default code path of the linker.

https://github.com/llvm/llvm-project/pull/157917


More information about the llvm-commits mailing list