From: Piotr Luc <piotr.luc@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 1/2] lib/igt_core.c: Add new parameter to prevent disabling LMK
Date: Tue, 22 Mar 2016 18:26:47 +0100 [thread overview]
Message-ID: <1458667608-28586-2-git-send-email-piotr.luc@intel.com> (raw)
In-Reply-To: <1458667608-28586-1-git-send-email-piotr.luc@intel.com>
From: Piotr Luc <Piotr.Luc@intel.com>
The 'keep-lmk-working' parameter added to prevent disabling the
Low Memory Killer.
Signed-off-by: Piotr Luc <Piotr.Luc@intel.com>
---
lib/igt_core.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 1f9be7d..734457a 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -228,6 +228,7 @@
static unsigned int exit_handler_count;
const char *igt_interactive_debug;
+static bool igt_disable_memory_killer = true;
/* subtests helpers */
static bool list_subtests = false;
@@ -257,6 +258,7 @@ enum {
OPT_DESCRIPTION,
OPT_DEBUG,
OPT_INTERACTIVE_DEBUG,
+ OPT_KEEP_LOW_MEM_KILLER_WORKING,
OPT_HELP = 'h'
};
@@ -514,7 +516,9 @@ bool igt_exit_called;
static void common_exit_handler(int sig)
{
if (!igt_only_list_subtests()) {
- low_mem_killer_disable(false);
+ if (igt_disable_memory_killer) {
+ low_mem_killer_disable(false);
+ }
}
/* When not killed by a signal check that igt_exit() has been properly
@@ -551,6 +555,7 @@ static void print_usage(const char *help_str, bool output_on_stderr)
" --run-subtest <pattern>\n"
" --debug[=log-domain]\n"
" --interactive-debug[=domain]\n"
+ " --keep-lmk-working\n"
" --help-description\n"
" --help\n");
if (help_str)
@@ -584,6 +589,7 @@ static int common_init(int *argc, char **argv,
{"help-description", 0, 0, OPT_DESCRIPTION},
{"debug", optional_argument, 0, OPT_DEBUG},
{"interactive-debug", optional_argument, 0, OPT_INTERACTIVE_DEBUG},
+ {"keep-lmk-working", optional_argument, 0, OPT_KEEP_LOW_MEM_KILLER_WORKING},
{"help", 0, 0, OPT_HELP},
{0, 0, 0, 0}
};
@@ -699,6 +705,9 @@ static int common_init(int *argc, char **argv,
print_test_description();
ret = -1;
goto out;
+ case OPT_KEEP_LOW_MEM_KILLER_WORKING:
+ igt_disable_memory_killer = false;
+ break;
case OPT_HELP:
print_usage(help_str, false);
ret = -1;
@@ -738,7 +747,9 @@ out:
print_version();
oom_adjust_for_doom();
- low_mem_killer_disable(true);
+ if (igt_disable_memory_killer) {
+ low_mem_killer_disable(true);
+ }
}
/* install exit handler, to ensure we clean up */
--
2.5.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-03-22 17:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 17:26 [PATCH i-g-t 0/2] New test to stress eviction Piotr Luc
2016-03-22 17:26 ` Piotr Luc [this message]
2016-03-22 17:26 ` [PATCH i-g-t 2/2] tests/gem_exec_mem_huge.c: " Piotr Luc
2016-03-23 11:12 ` Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458667608-28586-2-git-send-email-piotr.luc@intel.com \
--to=piotr.luc@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).