ORC JITDylib coarse-grained locking limits concurrent symbol resolution
0 reputation · 02 Dec 2020, 13:39 UTC
LLVM ORC JIT documents concurrent compilation support via ThreadSafeModule and JITDylib. The documented behavior indicates symbol table operations in JITDylib are protected by a coarse-grained mutex, and MaterializationResponsibility materialization is required to be single-threaded per symbol.
The design goal is to understand the concurrency limits for concurrent lookup and define operations without assuming a specific workload. Constraints include the documented requirement for single-threaded materialization per symbol and the use of a global lock for definition generators and symbol flags.
Is the coarse-grained mutex in JITDylib for define and lookup the documented concurrency bottleneck for concurrent requests? Is MaterializationResponsibility materialization guaranteed to be serialized per symbol across threads? What is the current documented status of the design decision to move to fine-grained locking or lock-free structures for the JITDylib symbol map?