summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorStefan Roesch <shr@devkernel.io>2023-02-28 21:39:35 +0100
committerLennart Poettering <lennart@poettering.net>2023-06-05 11:22:43 +0200
commit85614c6e2fb791b742941a8f98ea1851cf705240 (patch)
tree2a2f24529253d08cb5e8426ca9fec82a56bdcbaa /src/shared
parentchase: fix triggering assertion (diff)
downloadsystemd-85614c6e2fb791b742941a8f98ea1851cf705240.tar.xz
systemd-85614c6e2fb791b742941a8f98ea1851cf705240.zip
add support for KSM
This adds support for KSM (kernel samepage merging). It adds a new boolean parameter called MemoryKSM to enable the feature. The feature can only be enabled with newer kernels.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/bus-unit-util.c1
-rw-r--r--src/shared/exit-status.c1
-rw-r--r--src/shared/exit-status.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
index b32071104b..8b1a353a9b 100644
--- a/src/shared/bus-unit-util.c
+++ b/src/shared/bus-unit-util.c
@@ -991,6 +991,7 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con
"CPUSchedulingResetOnFork",
"LockPersonality",
"ProtectHostname",
+ "MemoryKSM",
"RestrictSUIDSGID"))
return bus_append_parse_boolean(m, field, eq);
diff --git a/src/shared/exit-status.c b/src/shared/exit-status.c
index 9063f231e1..623adda89e 100644
--- a/src/shared/exit-status.c
+++ b/src/shared/exit-status.c
@@ -72,6 +72,7 @@ const ExitStatusMapping exit_status_mappings[256] = {
[EXIT_NUMA_POLICY] = { "NUMA_POLICY", EXIT_STATUS_SYSTEMD },
[EXIT_CREDENTIALS] = { "CREDENTIALS", EXIT_STATUS_SYSTEMD },
[EXIT_BPF] = { "BPF", EXIT_STATUS_SYSTEMD },
+ [EXIT_KSM] = { "KSM", EXIT_STATUS_SYSTEMD },
[EXIT_EXCEPTION] = { "EXCEPTION", EXIT_STATUS_SYSTEMD },
diff --git a/src/shared/exit-status.h b/src/shared/exit-status.h
index 3f9a2ad54f..c22cba05b2 100644
--- a/src/shared/exit-status.h
+++ b/src/shared/exit-status.h
@@ -72,6 +72,7 @@ enum {
EXIT_NUMA_POLICY,
EXIT_CREDENTIALS,
EXIT_BPF,
+ EXIT_KSM,
EXIT_EXCEPTION = 255, /* Whenever we want to propagate an abnormal/signal exit, in line with bash */
};