diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-11-05 20:48:42 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-11-05 21:06:21 +0100 |
commit | ca7e6d131bd12d2a059fe5b431eecc9cae38fddb (patch) | |
tree | 036797119fdf319ce08f5d128f9bad09927ced1c | |
parent | 4d1caefe1d319e2798f3f71926e608e7ee1202ef (diff) | |
download | systemd-ca7e6d131bd12d2a059fe5b431eecc9cae38fddb.tar.gz |
logind: drop unused user_tasks_max fieldtasks-max-dynamic
We would only write to the field, and take the address. All *readers* were
removed in 284149392755f086d0a714071c33aa609e61505e. (The explanation for why
the field wasn't removed back then is that the patch underwent a few iterations,
with the initial version adding translation back and forth. Later versions of
the patch simply emit a warning and ignore the old value. Apparently nobody
noticed that the value became unused.)
-rw-r--r-- | src/basic/cgroup-util.h | 3 | ||||
-rw-r--r-- | src/login/logind-core.c | 1 | ||||
-rw-r--r-- | src/login/logind-gperf.gperf | 2 | ||||
-rw-r--r-- | src/login/logind-user.c | 1 | ||||
-rw-r--r-- | src/login/logind.h | 1 |
5 files changed, 1 insertions, 7 deletions
diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h index 6b4d6e1006..a717029cbe 100644 --- a/src/basic/cgroup-util.h +++ b/src/basic/cgroup-util.h @@ -129,9 +129,6 @@ static inline bool CGROUP_BLKIO_WEIGHT_IS_OK(uint64_t x) { (x >= CGROUP_BLKIO_WEIGHT_MIN && x <= CGROUP_BLKIO_WEIGHT_MAX); } -/* Default resource limits */ -#define DEFAULT_USER_TASKS_MAX_PERCENTAGE 33U /* 33% of PIDs, 10813 on default settings */ - typedef enum CGroupUnified { CGROUP_UNIFIED_UNKNOWN = -1, CGROUP_UNIFIED_NONE = 0, /* Both systemd and controllers on legacy */ diff --git a/src/login/logind-core.c b/src/login/logind-core.c index 4585afedc6..e84b38096a 100644 --- a/src/login/logind-core.c +++ b/src/login/logind-core.c @@ -54,7 +54,6 @@ void manager_reset_config(Manager *m) { m->idle_action = HANDLE_IGNORE; m->runtime_dir_size = physical_memory_scale(10U, 100U); /* 10% */ - m->user_tasks_max = system_tasks_max_scale(DEFAULT_USER_TASKS_MAX_PERCENTAGE, 100U); /* 33% */ m->sessions_max = 8192; m->inhibitors_max = 8192; diff --git a/src/login/logind-gperf.gperf b/src/login/logind-gperf.gperf index 8829ce7d85..983795da40 100644 --- a/src/login/logind-gperf.gperf +++ b/src/login/logind-gperf.gperf @@ -41,4 +41,4 @@ Login.RuntimeDirectorySize, config_parse_tmpfs_size, 0, offse Login.RemoveIPC, config_parse_bool, 0, offsetof(Manager, remove_ipc) Login.InhibitorsMax, config_parse_uint64, 0, offsetof(Manager, inhibitors_max) Login.SessionsMax, config_parse_uint64, 0, offsetof(Manager, sessions_max) -Login.UserTasksMax, config_parse_compat_user_tasks_max, 0, offsetof(Manager, user_tasks_max) +Login.UserTasksMax, config_parse_compat_user_tasks_max, 0, 0 diff --git a/src/login/logind-user.c b/src/login/logind-user.c index c3c8b1a2a5..1550431bea 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -849,7 +849,6 @@ int config_parse_compat_user_tasks_max( assert(filename); assert(lvalue); assert(rvalue); - assert(data); log_syntax(unit, LOG_NOTICE, filename, line, 0, "Support for option %s= has been removed.", diff --git a/src/login/logind.h b/src/login/logind.h index 5e2dc8cb77..f0f8928ef2 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -119,7 +119,6 @@ struct Manager { sd_event_source *lid_switch_ignore_event_source; uint64_t runtime_dir_size; - uint64_t user_tasks_max; uint64_t sessions_max; uint64_t inhibitors_max; }; |