Advice on modifying Lavapipe to isolate JIT compilation in separate process

Dave Airlie airlied at gmail.com
Thu Apr 27 07:39:53 UTC 2023


On Thu, 27 Apr 2023 at 15:18, Josh Gargus <jjosh at google.com> wrote:
>
> Thanks for your advice!  I hadn't looked at Venus, but that seems like a very promising place to start.
>
> The other approach feels more approachable now too; it feels like there are less "unknown unknowns", although there are plenty of known unknowns to investigate (address independence was one that was already bugging be before I wrote to this list).

I think it shouldn't be too horrible to work out, another option might
be to abuse the cache somehow, but I think that still needs writable +
executable which probably doesn't help, but stuff should be address
independent as I do write x86 asm programs to the cache and read them
back out, only relocating around the global symbols.

>
> It seems like Venus is the more straightforward approach, so I'm inclined to just go with it.  However, it seems like there would be a performance hit compared to only doing JIT compilation in a separate process.  Do you have a rough sense of the performance hit of serializing everything over Venus?  The answer will depend on the workload, I know.

Yeah I think you'll definitely see a large perf hit than just moving
compilation out to a separate process, I'm not sure of the raw venus
overhead numbers here, someone else might have more information
available.

Dave.


More information about the mesa-dev mailing list