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 <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19387>
* 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);