summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
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 14:10:49 -0500
commita17ac66f0a0b089dde0b2e550523b0d59ec97f52 (patch)
tree08c59a66f3cedcab00898813e8b444d93e94e0ab /src/lib/evas/common
parent13da63d26052b2839f2605fe20193a0da7fcea84 (diff)
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.
Diffstat (limited to 'src/lib/evas/common')
-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 @@
1#include "evas_common_private.h" 1#include "evas_common_private.h"
2#include "eina_cpu_private.h"
2 3
3#include <assert.h> 4#include <assert.h>
4 5
@@ -125,6 +126,8 @@ out:
125void 126void
126evas_thread_init(void) 127evas_thread_init(void)
127{ 128{
129 int core;
130
128 if (init_count++) return; 131 if (init_count++) return;
129 132
130 eina_threads_init(); 133 eina_threads_init();
@@ -135,7 +138,9 @@ evas_thread_init(void)
135 CRI("Could not create draw thread lock"); 138 CRI("Could not create draw thread lock");
136 if (!eina_condition_new(&evas_thread_queue_condition, &evas_thread_queue_lock)) 139 if (!eina_condition_new(&evas_thread_queue_condition, &evas_thread_queue_lock))
137 CRI("Could not create draw thread condition"); 140 CRI("Could not create draw thread condition");
138 if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, 0, 141
142 core = _eina_cpu_fast_core_get();
143 if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, core,
139 evas_thread_worker_func, NULL)) 144 evas_thread_worker_func, NULL))
140 if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, -1, 145 if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, -1,
141 evas_thread_worker_func, NULL)) 146 evas_thread_worker_func, NULL))