summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-09-15 16:05:25 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-09-16 13:06:23 -0500
commit94ee6fd511f40c405cf06d913535f297484df626 (patch)
tree50b6944b0a5a29bda61f896af2d3a5557dc34801
parent57e18cabdeb0619afa41325918f1ed08e0ea5797 (diff)
downloadefl-94ee6fd511f40c405cf06d913535f297484df626.tar.gz
render_thread: Attempt to set affinity to a random fast core
We've been pinning the render thread for every EFL process to core 0. This is a bit silly in the first place, but some big.LITTLE arm systems, such as exynos 5422, have the LITTLE cores first. On those systems we put all the render threads on a slow core. This attempts to fix that by using a random core from the pool of fast cores. If we can't determine which cores are fast (ie: we're not on a linux kernel with cpufreq enabled) then we'll continue doing what we've always done.
-rw-r--r--src/lib/evas/common/evas_thread_render.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/evas/common/evas_thread_render.c b/src/lib/evas/common/evas_thread_render.c
index 623e40e4f4..562ef29eee 100644
--- a/src/lib/evas/common/evas_thread_render.c
+++ b/src/lib/evas/common/evas_thread_render.c
@@ -1,4 +1,5 @@
#include "evas_common_private.h"
+#include "eina_cpu_private.h"
#include <assert.h>
@@ -125,6 +126,8 @@ out:
void
evas_thread_init(void)
{
+ int core;
+
if (init_count++) return;
eina_threads_init();
@@ -135,7 +138,9 @@ evas_thread_init(void)
CRI("Could not create draw thread lock");
if (!eina_condition_new(&evas_thread_queue_condition, &evas_thread_queue_lock))
CRI("Could not create draw thread condition");
- if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, 0,
+
+ core = _eina_cpu_fast_core_get();
+ if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, core,
evas_thread_worker_func, NULL))
if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, -1,
evas_thread_worker_func, NULL))