[Intel-gfx] [PATCH i-g-t] lib/igt_core.c : only disable low mem killer once

tim.gore at intel.com tim.gore at intel.com
Fri Apr 24 06:43:39 PDT 2015


From: Tim Gore <tim.gore at 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.gore at 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



More information about the Intel-gfx mailing list