[PATCH] D133003: [ELF] Parallelize relocation scanning

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 6 10:11:01 PDT 2022


andrewng added a comment.

> Don't yet know the reason for the slow down but I suspect it will be related to the "size" of the tasks being spawned in parallel.

Had some time to investigate a bit more and it seems that the slow down, at least on my 12C/24T Windows PC, is actually a result of contention over `relocMutex` in `RelocationScanner::processAux`. So "too many" concurrent threads running `RelocationScanner::processAux` can result in an overall slow down to scan the relocations and in these cases, it's likely to slow down even further with more available threads. Unfortunately, there's no mechanism in `parallel::TaskGroup` to limit the number of concurrent tasks being run by the pool from the group, so there's no "easy" solution. I've been experimenting with some ideas that shard the input sections such that there are fewer concurrent threads running the relocation scanning code.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133003/new/

https://reviews.llvm.org/D133003



More information about the llvm-commits mailing list