[x265] [PATCH] Performance: Fixing thread clipping heuristic to 1/4th max pool threads

pradeep at multicorewareinc.com pradeep at multicorewareinc.com
Mon Sep 14 06:59:33 CEST 2015


# HG changeset patch
# User Pradeep Ramachandran <pradeep at multicorewareinc.com>
# Date 1442206746 -19800
#      Mon Sep 14 10:29:06 2015 +0530
# Node ID 7f59a02036f52384dc9b0cf7db6b980b5d21d129
# Parent  365f7ed4d89628d49cd6af8d81d4edc01f73ffad
Performance: Fixing thread clipping heuristic to 1/4th max pool threads

diff -r 365f7ed4d896 -r 7f59a02036f5 source/common/threadpool.cpp
--- a/source/common/threadpool.cpp	Tue Sep 08 16:38:01 2015 +0530
+++ b/source/common/threadpool.cpp	Mon Sep 14 10:29:06 2015 +0530
@@ -313,9 +313,9 @@
         }
     }
  
-    // If the last pool size is > MAX_POOL_THREADS, clip it to spawn thread pools only of size >= 1/2 max (heuristic)
+    // If the last pool size is > MAX_POOL_THREADS, clip it to spawn thread pools only of size >= 1/4 max (heuristic)
     if ((threadsPerPool[numNumaNodes] > MAX_POOL_THREADS) &&
-        ((threadsPerPool[numNumaNodes] % MAX_POOL_THREADS) < (MAX_POOL_THREADS / 2)))
+        ((threadsPerPool[numNumaNodes] % MAX_POOL_THREADS) < (MAX_POOL_THREADS / 4)))
     {
         threadsPerPool[numNumaNodes] -= (threadsPerPool[numNumaNodes] % MAX_POOL_THREADS);
         x265_log(p, X265_LOG_DEBUG,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 1167 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150914/7ad30474/attachment.bin>


More information about the x265-devel mailing list