diff options
author | Tim Gore <tim.gore@intel.com> | 2014-10-01 13:25:20 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-10-01 14:44:30 +0200 |
commit | 5782eca1e19e85a04ad402fa4094aa1b5f9c53ce (patch) | |
tree | 2cde7fca8fe32260f9d22d6ba658bfaa742fb2ad /tests/gem_render_linear_blits.c | |
parent | 20c8eba84ce4f108b5a980fe7278da5853655c1d (diff) |
lib/igt_core.c: disable lowmemorykiller during tests
Several IGT tests cycle through a lot of GEM memory and
when running these tests on Android they tend to get
killed by the lowmemorykiller. The lowmemorykiller really
is not usefull in this context and is just preventing the
test from doing its job. This commit adds a function to
disable the lowmemorykiller by writing "9999" to its
oom adj parameter, which means it will never "select"
any process to kill. The normal linux oom killer is still
there to protect the kernel.
The low memory killer is disabled during the common
init function and then re-enabled by the exit handler.
To make this work for single tests the exit handler is now
installed in the common init function also so that it is
invoked for all tests.
This is just a hack to get round the fact that the i915
driver uses the concept of purgeable memory which is not
understood by the lowmemorykiller. If this ever gets
fixed then this patch can be removed.
Signed-off-by: Tim Gore <tim.gore@intel.com>
[danvet: A bit of polish (coding style, static and rename
check_igt_exit to common_exit_handler, drop the is_disabled check
since we only call this once now).]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_render_linear_blits.c')
0 files changed, 0 insertions, 0 deletions