derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=541b72dcb2aa7a0a09c6b57603da2800d8caac01

commit 541b72dcb2aa7a0a09c6b57603da2800d8caac01
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Mon Sep 19 09:39:35 2016 -0500

    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 - pin to core 0.
---
 src/lib/evas/common/evas_thread_render.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/common/evas_thread_render.c 
b/src/lib/evas/common/evas_thread_render.c
index 623e40e..3489c5a 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,7 @@ out:
 void
 evas_thread_init(void)
 {
+    int core;
     if (init_count++) return;
 
     eina_threads_init();
@@ -135,7 +137,13 @@ 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();
+    /* Keep previous behaviour of pinning to core 0 if finding a fast
+     * core fails.
+     */
+    if (core < 0) core = 0;
+    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))

-- 


Reply via email to