[2/2] framework: double the number of concurrent tests per core

Submitted by Marek Olšák on Feb. 5, 2017, 7:28 p.m.

Details

Message ID 1486322922-15753-2-git-send-email-maraeo@gmail.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Marek Olšák Feb. 5, 2017, 7:28 p.m.
From: Marek Olšák <marek.olsak@amd.com>

This makes piglit 16% faster, because 1 thread per core uses only 85%
of the CPU. I don't know why the CPU is idle at times, but I guess it's
due to waiting for fences.
---
 framework/profile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/framework/profile.py b/framework/profile.py
index 94efd0a..61eabd0 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -423,21 +423,21 @@  def run(profiles, logger, backend, concurrency):
             # pool
             run_threads(single, profile, test_list,
                         lambda x: not x[1].run_concurrent)
         profile.teardown()
 
     # Multiprocessing.dummy is a wrapper around Threading that provides a
     # multiprocessing compatible API
     #
     # The default value of pool is the number of virtual processor cores
     single = multiprocessing.dummy.Pool(1)
-    multi = multiprocessing.dummy.Pool()
+    multi = multiprocessing.dummy.Pool(multiprocessing.cpu_count() * 2)
 
     try:
         for p in profiles:
             run_profile(*p)
 
         for pool in [single, multi]:
             pool.close()
             pool.join()
     finally:
         log.get().summary()