[x265] [PATCH] bug: Clip # threads only if # threads is > MAX_POOL_THREADS, no check earlier
pradeep at multicorewareinc.com
pradeep at multicorewareinc.com
Tue Sep 1 08:08:58 CEST 2015
# HG changeset patch
# User Pradeep Ramachandran <pradeep at multicorewareinc.com>
# Date 1441087727 -19800
# Tue Sep 01 11:38:47 2015 +0530
# Node ID 9f669a8d959e557c7ea2cc7be59c807dc5b8dee2
# Parent 20941da8ac6a115e88a419ba713ee9ea10d70c7e
bug: Clip # threads only if # threads is > MAX_POOL_THREADS, no check earlier
diff -r 20941da8ac6a -r 9f669a8d959e source/common/threadpool.cpp
--- a/source/common/threadpool.cpp Fri Aug 28 17:51:54 2015 -0700
+++ b/source/common/threadpool.cpp Tue Sep 01 11:38:47 2015 +0530
@@ -291,7 +291,9 @@
// In the case that numa is disabled and we have more CPUs than 64,
// spawn the last pool only if the # threads in that pool is > 1/2 max (heuristic)
- if ((numNumaNodes == 1) && (cpusPerNode[0] % MAX_POOL_THREADS < (MAX_POOL_THREADS / 2)))
+ if ((numNumaNodes == 1) &&
+ (cpusPerNode[0] > MAX_POOL_THREADS) &&
+ (cpusPerNode[0] % MAX_POOL_THREADS < (MAX_POOL_THREADS / 2)))
{
cpusPerNode[0] -= (cpusPerNode[0] % MAX_POOL_THREADS);
x265_log(p, X265_LOG_DEBUG, "Creating only %d worker threads to prevent asymmetry in pools; may not use all HW contexts\n", cpusPerNode[0]);
More information about the x265-devel
mailing list