From: Tim Gore <tim.g...@intel.com>

The call to low_mem_killer_disable(true) was being done
from within function oom_adjust_for_doom. However,
oom_adjust_for_doom gets called from 3 places. We only
want the call to low_mem_killer_disable(true) to happen
during common_init, so call it from here instead of from
oom_adjust_for_doom.

Signed-off-by: Tim Gore <tim.g...@intel.com>
---
 lib/igt_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 7d04f2c..fec4893 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -490,7 +490,6 @@ static void oom_adjust_for_doom(void)
        igt_assert(write(fd, always_kill, sizeof(always_kill)) == 
sizeof(always_kill));
        close(fd);
 
-       low_mem_killer_disable(true);
 }
 
 static int common_init(int *argc, char **argv,
@@ -653,6 +652,7 @@ out:
                print_version();
 
                oom_adjust_for_doom();
+               low_mem_killer_disable(true);
        }
 
        /* install exit handler, to ensure we clean up */
-- 
2.3.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to