diff options
author | Marek Olšák <[email protected]> | 2018-11-12 19:09:25 -0500 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-11-20 21:18:43 -0500 |
commit | bc5adc27b5e52d27eca6a61ad1e049b160570c98 (patch) | |
tree | 19871642ee9cd58ca2af7a542cbf0ca61d87e43d /src/mesa/state_tracker | |
parent | 48f2160936f8a803960891f8ab0958e0b26e7dc3 (diff) |
st/mesa: pin driver threads to a fixed CCX when glthread is enabled
radeonsi has 3 driver threads (glthread, gallium, winsys), other drivers
may have 2 (glthread, gallium), so it makes sense to pin them to a random
CCX and keep that irrespective of the app thread.
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_manager.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 076ad42646d..73729d74545 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -800,6 +800,17 @@ st_start_thread(struct st_context_iface *stctxi) struct st_context *st = (struct st_context *) stctxi; _mesa_glthread_init(st->ctx); + + /* Pin all driver threads to one L3 cache for optimal performance + * on AMD Zen. This is only done if glthread is enabled. + * + * If glthread is disabled, st_draw.c re-pins driver threads regularly + * based on the location of the app thread. + */ + struct glthread_state *glthread = st->ctx->GLThread; + if (glthread && st->pipe->set_context_param) { + util_pin_driver_threads_to_random_L3(st->pipe, &glthread->queue.threads[0]); + } } |