[PATCH] D85974: [ORC] Add a LLJITWithThinLTOSummaries example in OrcV2Examples

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 15 17:58:14 PDT 2020


lhames added a comment.

In D85974#2218483 <https://reviews.llvm.org/D85974#2218483>, @sgraenitz wrote:

> In D85974#2218405 <https://reviews.llvm.org/D85974#2218405>, @lhames wrote:
>
>> What performance issues did you run in to with threading and performance? I haven't had a chance to look in to that yet.
>
> Performance gains inherently depended on a smart handling of fine-grained async tasks. Otherwise the runtime cost for handling concurrency is easily eating up the gains quickly. I have the impression that the LLVM ThreadPool implementation is too limited here, e.g. there is no mechanism for priority-based scheduling. Trying to walk around the limitations added at lot of complexity that I didn't manage to handle. It might be easier with a decent threading library at hand or maybe a Rust-like async/await. More experiments to come out-of-tree :)

Yep. We have the ExtensibleRTTI system available now, but I haven't had time to hook it up to MaterializationUnit -- doing so might give you some of the prioritization information that you need.

I also want to generalize the ExecutionSession dispatch API to handle arbitrary tasks, rather than just MaterializationUnits. If query handlers were dispatched rather than running on the thread that satisfies the last query dependence it should expose some new opportunities for concurrency.

I will be very interested to hear how your experiments go -- I'd love to get all this tuned to improve performance.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85974



More information about the llvm-commits mailing list