From e090e313fa8d9e0da8302a93ca6cb5011be28d96 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Mon, 31 Oct 2022 07:59:32 -0700 Subject: [PATCH] freedreno/ir3: Reduce compiler thread pool size With the current scheme, looking at game startup which should be the worst case (most heavily loaded) time for the compiler threads, and they seem to be ~10% busy. Furthermore we typically have a mix of "big" and "LITTLE" cores.. with about half being "big". So sizing the thread pool to the half the # of CPU cores seems reasonable. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/ir3/ir3_gallium.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c index f2a574ac9c9..7b406ac1338 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c @@ -556,7 +556,7 @@ ir3_screen_init(struct pipe_screen *pscreen) * big cores. OTOH if they are sitting idle, maybe it is useful to * use them? */ - unsigned num_threads = sysconf(_SC_NPROCESSORS_ONLN) - 1; + unsigned num_threads = sysconf(_SC_NPROCESSORS_ONLN) / 2; /* Create at least one thread - even on single core CPU systems. */ num_threads = MAX2(1, num_threads);