[llvm] [llvm-exegesis] Add support for pinning benchmarking process to a CPU (PR #85168)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 17:58:59 PDT 2024


boomanaiden154 wrote:

Right, the child will inherit the affinity of the parent, but we don't want the child to have the same affinity as the parent. The main llvm-exegesis process isn't sensitive to the core at all, just running things like the assembler, so doesn't need special affinity. When pinning to a single core that has been set aside using something like `isolcpu` or cgroups, pinning both the main `llvm-exegesis` process and the benchmarking process to the same core will require the scheduler to swap them in and out a couple times, which isn't what is desired. This approach only puts the benchmarking subprocess on a specific core to prevent this issue, at the cost of some complexity.

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


More information about the llvm-commits mailing list