Skip to content

mesa,gallium,hud: move L3 thread scheduling to util, optimize, add mesa_pin_threads env var for static affinity mask

Marek Olšák requested to merge mareko/mesa:thread-sched into main

This is a rewrite of what we have by moving it to util and changing how it's used.

There are a few functional changes:

  • setting the affinity mask is skipped if the kernel hasn't moved the app thread to a different L3. This adds +1% to CPU-bound FPS consistently, which is bigger than expected.
  • fixed an oversight in the previous implementation that the thread scheduling policy wasn't applied:
    • when the context was created
    • when glthread was synchronized

Finally, mesa_pin_threads environment variable is added to reduce randomness of benchmark results. Useful for evaluating the effect of optimizations.

The HUD change to output CSV is for easier gathering of performance data.

Edited by Marek Olšák

Merge request reports