lib/igt_core.c : only disable low mem killer once
lib/igt_core.c : only disable low mem killer once

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.

v2:Thomas Wood pointed out that the initial call to disable
the low_mem_killer does not get made when we are just
listing subtests; so I have qualified the call from the
exit handler, which re-enables the low_mem_killer, with
if (!igt_only_list_subtests()).
For belt and braces I have also made low_mem_killer_disable
idempotent, so multiple calls to disable or re-enable are
safe.

Signed-off-by: Tim Gore <574638b6c8be9618c62b9975be7a73fefbc6d4f1@intel.com>
[Thomas: small coding style fix]
Signed-off-by: Thomas Wood <b9025d6a953b68f894a0f6a80fd2af6d55b0badd@intel.com>

chenxianqin/intel-gpu-tools,dlespiau/checkmate-test-igt,tiagovignatti/intel-gpu-tools,dlespiau/checkmate-test-igt,tiagovignatti/intel-gpu-tools,chenxianqin/intel-gpu-tools,dlespiau/checkmate-test-igt,chenxianqin/intel-gpu-tools,mv0/intel-gpu-tools,mv0/intel-gpu-tools,mv0/intel-gpu-tools,mv0/intel-gpu-tools,chenxianqin/intel-gpu-tools,tiagovignatti/intel-gpu-tools,tiagovignatti/intel-gpu-tools,dlespiau/checkmate-test-igt