aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_linux.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-12-01 13:53:42 +0100
committerDmitry Vyukov <dvyukov@google.com>2020-12-01 15:38:13 +0100
commit57aef9d9a2a3f567568a77c4b3209d86f9340013 (patch)
treeed1e1a1d420e82668013f81c59e61e169b26e641 /executor/common_linux.h
parent07bfe8a540418c37449ef29dfc84ccf4d15ea0e0 (diff)
executor: tune few more sysctl's
Faster gc (1 second) is intended to make tests more repeatable. {"/proc/sys/kernel/keys/gc_delay", "1"}, Huge page overcommit is disabled by default, allowing some overcommit is intended to give more coverage. {"/proc/sys/vm/nr_overcommit_hugepages", "4"}, We always want to prefer killing the allocating test process rather than somebody else (sshd or another random test process). {"/proc/sys/vm/oom_kill_allocating_task", "1"},
Diffstat (limited to 'executor/common_linux.h')
-rw-r--r--executor/common_linux.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h
index 98489f12d..a7e45bd26 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -4618,6 +4618,13 @@ static void setup_sysctl()
{"/proc/sys/debug/exception-trace", "0"},
{"/proc/sys/kernel/printk", "7 4 1 3"},
{"/proc/sys/net/ipv4/ping_group_range", "0 65535"},
+ // Faster gc (1 second) is intended to make tests more repeatable.
+ {"/proc/sys/kernel/keys/gc_delay", "1"},
+ // Huge page overcommit is disabled by default, allowing some overcommit is intended to give more coverage.
+ {"/proc/sys/vm/nr_overcommit_hugepages", "4"},
+ // We always want to prefer killing the allocating test process rather than somebody else
+ // (sshd or another random test process).
+ {"/proc/sys/vm/oom_kill_allocating_task", "1"},
};
for (size_t i = 0; i < sizeof(files) / sizeof(files[0]); i++) {
if (!write_file(files[i].name, files[i].data))