Projects
openEuler:24.03:SP1:Everything:64G
systemd
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:systemd.spec
Changed
@@ -25,7 +25,7 @@ Name: systemd Url: https://systemd.io/ Version: 255 -Release: 21 +Release: 22 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -1658,6 +1658,9 @@ %{_unitdir}/veritysetup.target %changelog +* Mon Sep 23 2024 xujing <xujing125@huawei.com> - 255-22 +- DESC:fix cgroup v2 cpuset function error and optimize the code of cpuset and freezer + * Tue Aug 13 2024 huyubiao <huyubiao@huawei.com> - 255-21 - DESC:dont create dont-synthesize-nobody when login shell is /sbin/nologin or /usr/sbin/nologin
View file
_service:tar_scm:bugfix-for-cgroup-Swap-cgroup-v1-deletion-and-migration.patch
Changed
@@ -15,7 +15,7 @@ u->cgroup_enabled_mask = result_mask; migrate_mask = u->cgroup_realized_mask ^ target_mask; -+ if (u->type != UNIT_SLICE && FLAGS_SET(target_mask, CGROUP_MASK_CPUSET)) ++ if (u->type != UNIT_SLICE && FLAGS_SET(target_mask, CGROUP_MASK_CPUSET) && cg_all_unified() == 0) + migrate_mask |= CGROUP_MASK_CPUSET; }
View file
_service:tar_scm:core-cgroup-support-cpuset.patch
Changed
@@ -1,34 +1,32 @@ -From 2ea8175b3d8ec118fa0f42392485ce0f4308456a Mon Sep 17 00:00:00 2001 +From 8fc496f1e5b6d71d29eb446e02f6317bdc45c7c2 Mon Sep 17 00:00:00 2001 From: licunlong <licunlong1@huawei.com> Date: Thu, 6 May 2021 09:38:54 +0800 Subject: PATCH core-cgroup: support cpuset This patch add support for cpuset subsystem. --- - meson.build | 2 + - meson_options.txt | 3 + - src/basic/cgroup-util.c | 3 +- - src/basic/cgroup-util.h | 14 ++- - src/basic/string-util.c | 42 +++++++ - src/basic/string-util.h | 1 + - src/core/cgroup.c | 112 ++++++++++++++---- - src/core/cgroup.h | 14 ++- - src/core/dbus-cgroup.c | 60 ++++++++-- - src/core/dbus-manager.c | 1 + - src/core/execute-serialize.c | 44 +++---- - src/core/load-fragment-gperf.gperf.in | 13 +- - src/core/load-fragment.c | 69 +++++++++++ - src/core/load-fragment.h | 1 + - src/core/main.c | 1 + - src/core/manager.c | 2 + - src/core/manager.h | 1 + - src/core/system.conf.in | 1 + - src/core/unit.c | 1 + - src/shared/bus-unit-util.c | 15 ++- - src/shared/cpu-set-util.c | 1 + - src/test/test-cgroup-mask.c | 5 +- - .../fuzz-unit-file/directives-all.service | 5 + - 23 files changed, 338 insertions(+), 73 deletions(-) + meson.build | 2 + + meson_options.txt | 3 + + src/basic/cgroup-util.h | 8 ++- + src/basic/string-util.c | 42 +++++++++++ + src/basic/string-util.h | 1 + + src/core/cgroup.c | 62 ++++++++++++++++- + src/core/cgroup.h | 6 ++ + src/core/dbus-cgroup.c | 42 +++++++++++ + src/core/dbus-manager.c | 1 + + src/core/load-fragment-gperf.gperf.in | 5 ++ + src/core/load-fragment.c | 69 +++++++++++++++++++ + src/core/load-fragment.h | 1 + + src/core/main.c | 1 + + src/core/manager.c | 2 + + src/core/manager.h | 1 + + src/core/system.conf.in | 1 + + src/core/unit.c | 1 + + src/shared/bus-unit-util.c | 15 +++- + src/shared/cpu-set-util.c | 1 + + src/test/test-cgroup-mask.c | 1 + + .../fuzz-unit-file/directives-all.service | 5 ++ + 21 files changed, 264 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 7419e2b..614013b 100644 @@ -61,60 +59,20 @@ + +option('cpuset-cgv1', type : 'boolean', value : 'true', + description : 'enable cgroup v1 cpuset support') -diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index 18b16ec..abd1f91 100644 ---- a/src/basic/cgroup-util.c -+++ b/src/basic/cgroup-util.c -@@ -2352,12 +2352,13 @@ bool fd_is_cgroup_fs(int fd) { - static const char *const cgroup_controller_table_CGROUP_CONTROLLER_MAX = { - CGROUP_CONTROLLER_CPU = "cpu", - CGROUP_CONTROLLER_CPUACCT = "cpuacct", -- CGROUP_CONTROLLER_CPUSET = "cpuset", -+ CGROUP_CONTROLLER_CPUSET2 = "cpuset2", - CGROUP_CONTROLLER_IO = "io", - CGROUP_CONTROLLER_BLKIO = "blkio", - CGROUP_CONTROLLER_MEMORY = "memory", - CGROUP_CONTROLLER_DEVICES = "devices", - CGROUP_CONTROLLER_PIDS = "pids", -+ CGROUP_CONTROLLER_CPUSET = "cpuset", - CGROUP_CONTROLLER_BPF_FIREWALL = "bpf-firewall", - CGROUP_CONTROLLER_BPF_DEVICES = "bpf-devices", - CGROUP_CONTROLLER_BPF_FOREIGN = "bpf-foreign", diff --git a/src/basic/cgroup-util.h b/src/basic/cgroup-util.h -index 6ab14c7..dd3df28 100644 +index 6ab14c7..831f8ce 100644 --- a/src/basic/cgroup-util.h +++ b/src/basic/cgroup-util.h -@@ -22,12 +22,13 @@ typedef enum CGroupController { +@@ -22,7 +22,7 @@ typedef enum CGroupController { /* Original cgroup controllers */ CGROUP_CONTROLLER_CPU, CGROUP_CONTROLLER_CPUACCT, /* v1 only */ - CGROUP_CONTROLLER_CPUSET, /* v2 only */ -+ CGROUP_CONTROLLER_CPUSET2, /* v2 only */ ++ CGROUP_CONTROLLER_CPUSET, CGROUP_CONTROLLER_IO, /* v2 only */ CGROUP_CONTROLLER_BLKIO, /* v1 only */ CGROUP_CONTROLLER_MEMORY, - CGROUP_CONTROLLER_DEVICES, /* v1 only */ - CGROUP_CONTROLLER_PIDS, -+ CGROUP_CONTROLLER_CPUSET, - - /* BPF-based pseudo-controllers, v2 only */ - CGROUP_CONTROLLER_BPF_FIREWALL, -@@ -49,12 +50,13 @@ typedef enum CGroupController { - typedef enum CGroupMask { - CGROUP_MASK_CPU = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_CPU), - CGROUP_MASK_CPUACCT = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_CPUACCT), -- CGROUP_MASK_CPUSET = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_CPUSET), -+ CGROUP_MASK_CPUSET2 = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_CPUSET2), - CGROUP_MASK_IO = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_IO), - CGROUP_MASK_BLKIO = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BLKIO), - CGROUP_MASK_MEMORY = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_MEMORY), - CGROUP_MASK_DEVICES = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_DEVICES), - CGROUP_MASK_PIDS = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_PIDS), -+ CGROUP_MASK_CPUSET = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_CPUSET), - CGROUP_MASK_BPF_FIREWALL = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BPF_FIREWALL), - CGROUP_MASK_BPF_DEVICES = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BPF_DEVICES), - CGROUP_MASK_BPF_FOREIGN = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BPF_FOREIGN), -@@ -62,10 +64,14 @@ typedef enum CGroupMask { +@@ -62,7 +62,11 @@ typedef enum CGroupMask { CGROUP_MASK_BPF_RESTRICT_NETWORK_INTERFACES = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BPF_RESTRICT_NETWORK_INTERFACES), /* All real cgroup v1 controllers */ @@ -126,11 +84,7 @@ + , /* All real cgroup v2 controllers */ -- CGROUP_MASK_V2 = CGROUP_MASK_CPU|CGROUP_MASK_CPUSET|CGROUP_MASK_IO|CGROUP_MASK_MEMORY|CGROUP_MASK_PIDS, -+ CGROUP_MASK_V2 = CGROUP_MASK_CPU|CGROUP_MASK_CPUSET2|CGROUP_MASK_IO|CGROUP_MASK_MEMORY|CGROUP_MASK_PIDS, - - /* All cgroup v2 BPF pseudo-controllers */ - CGROUP_MASK_BPF = CGROUP_MASK_BPF_FIREWALL|CGROUP_MASK_BPF_DEVICES|CGROUP_MASK_BPF_FOREIGN|CGROUP_MASK_BPF_SOCKET_BIND|CGROUP_MASK_BPF_RESTRICT_NETWORK_INTERFACES, + CGROUP_MASK_V2 = CGROUP_MASK_CPU|CGROUP_MASK_CPUSET|CGROUP_MASK_IO|CGROUP_MASK_MEMORY|CGROUP_MASK_PIDS, diff --git a/src/basic/string-util.c b/src/basic/string-util.c index 7329bfa..0fecb40 100644 --- a/src/basic/string-util.c @@ -197,65 +151,23 @@ char *string_replace_char(char *str, char old_char, char new_char); diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 78bc551..cd1e97d 100644 +index 78bc551..3154fd3 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c -@@ -91,8 +91,8 @@ bool unit_has_startup_cgroup_constraints(Unit *u) { - return c->startup_cpu_shares != CGROUP_CPU_SHARES_INVALID || - c->startup_io_weight != CGROUP_WEIGHT_INVALID || - c->startup_blockio_weight != CGROUP_BLKIO_WEIGHT_INVALID || -- c->startup_cpuset_cpus.set || -- c->startup_cpuset_mems.set || -+ c->startup_cpuset_cpus2.set || -+ c->startup_cpuset_mems2.set || - c->startup_memory_high_set || - c->startup_memory_max_set || - c->startup_memory_swap_max_set|| -@@ -293,10 +293,16 @@ void cgroup_context_done(CGroupContext *c) { +@@ -293,6 +293,12 @@ void cgroup_context_done(CGroupContext *c) { c->restrict_network_interfaces = set_free_free(c->restrict_network_interfaces); -- cpu_set_reset(&c->cpuset_cpus); -- cpu_set_reset(&c->startup_cpuset_cpus); -- cpu_set_reset(&c->cpuset_mems); -- cpu_set_reset(&c->startup_cpuset_mems); -+ if (c->cpuset_cpus) -+ c->cpuset_cpus = mfree(c->cpuset_cpus); ++ if (c->cpuset_cpus_v1) ++ c->cpuset_cpus_v1 = mfree(c->cpuset_cpus_v1); + -+ if (c->cpuset_mems) -+ c->cpuset_mems = mfree(c->cpuset_mems); ++ if (c->cpuset_mems_v1) ++ c->cpuset_mems_v1 = mfree(c->cpuset_mems_v1); + -+ cpu_set_reset(&c->cpuset_cpus2); -+ cpu_set_reset(&c->startup_cpuset_cpus2); -+ cpu_set_reset(&c->cpuset_mems2); -+ cpu_set_reset(&c->startup_cpuset_mems2); - - c->delegate_subgroup = mfree(c->delegate_subgroup); - -@@ -496,7 +502,7 @@ CGroupDevicePermissions cgroup_device_permissions_from_string(const char *s) { - } - - void cgroup_context_dump(Unit *u, FILE* f, const char *prefix) { -- _cleanup_free_ char *disable_controllers_str = NULL, *delegate_controllers_str = NULL, *cpuset_cpus = NULL, *cpuset_mems = NULL, *startup_cpuset_cpus = NULL, *startup_cpuset_mems = NULL; -+ _cleanup_free_ char *disable_controllers_str = NULL, *delegate_controllers_str = NULL, *cpuset_cpus2 = NULL, *cpuset_mems2 = NULL, *startup_cpuset_cpus2 = NULL, *startup_cpuset_mems2 = NULL; - CGroupContext *c; - struct in_addr_prefix *iaai; - -@@ -525,16 +531,17 @@ void cgroup_context_dump(Unit *u, FILE* f, const char *prefix) { - /* "Delegate=" means "yes, but no controllers". Show this as "(none)". */ - const char *delegate_str = delegate_controllers_str ?: c->delegate ? "(none)" : "no"; - -- cpuset_cpus = cpu_set_to_range_string(&c->cpuset_cpus); -- startup_cpuset_cpus = cpu_set_to_range_string(&c->startup_cpuset_cpus); -- cpuset_mems = cpu_set_to_range_string(&c->cpuset_mems); -- startup_cpuset_mems = cpu_set_to_range_string(&c->startup_cpuset_mems); -+ cpuset_cpus2 = cpu_set_to_range_string(&c->cpuset_cpus2); -+ startup_cpuset_cpus2 = cpu_set_to_range_string(&c->startup_cpuset_cpus2);
View file
_service:tar_scm:core-cgroup-support-freezer.patch
Changed
@@ -65,9 +65,9 @@ --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -2359,6 +2359,7 @@ static const char *const cgroup_controller_table_CGROUP_CONTROLLER_MAX = { + CGROUP_CONTROLLER_MEMORY = "memory", CGROUP_CONTROLLER_DEVICES = "devices", CGROUP_CONTROLLER_PIDS = "pids", - CGROUP_CONTROLLER_CPUSET = "cpuset", + CGROUP_CONTROLLER_FREEZER = "freezer", CGROUP_CONTROLLER_BPF_FIREWALL = "bpf-firewall", CGROUP_CONTROLLER_BPF_DEVICES = "bpf-devices", @@ -77,17 +77,17 @@ --- a/src/basic/cgroup-util.h +++ b/src/basic/cgroup-util.h @@ -29,6 +29,7 @@ typedef enum CGroupController { + CGROUP_CONTROLLER_MEMORY, CGROUP_CONTROLLER_DEVICES, /* v1 only */ CGROUP_CONTROLLER_PIDS, - CGROUP_CONTROLLER_CPUSET, -+ CGROUP_CONTROLLER_FREEZER, ++ CGROUP_CONTROLLER_FREEZER, /* v1 only */ /* BPF-based pseudo-controllers, v2 only */ CGROUP_CONTROLLER_BPF_FIREWALL, @@ -57,6 +58,7 @@ typedef enum CGroupMask { + CGROUP_MASK_MEMORY = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_MEMORY), CGROUP_MASK_DEVICES = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_DEVICES), CGROUP_MASK_PIDS = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_PIDS), - CGROUP_MASK_CPUSET = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_CPUSET), + CGROUP_MASK_FREEZER = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_FREEZER), CGROUP_MASK_BPF_FIREWALL = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BPF_FIREWALL), CGROUP_MASK_BPF_DEVICES = CGROUP_CONTROLLER_TO_MASK(CGROUP_CONTROLLER_BPF_DEVICES), @@ -110,16 +110,16 @@ .startup_blockio_weight = CGROUP_BLKIO_WEIGHT_INVALID, .tasks_max = CGROUP_TASKS_MAX_UNSET, -+ .freezer_state = NULL, ++ .freezer_state_v1 = NULL, .moom_swap = MANAGED_OOM_AUTO, .moom_mem_pressure = MANAGED_OOM_AUTO, @@ -304,6 +305,9 @@ void cgroup_context_done(CGroupContext *c) { - cpu_set_reset(&c->cpuset_mems2); - cpu_set_reset(&c->startup_cpuset_mems2); + cpu_set_reset(&c->cpuset_mems); + cpu_set_reset(&c->startup_cpuset_mems); -+ if (c->freezer_state) -+ c->freezer_state = mfree(c->freezer_state); ++ if (c->freezer_state_v1) ++ c->freezer_state_v1 = mfree(c->freezer_state_v1); + c->delegate_subgroup = mfree(c->delegate_subgroup); @@ -152,7 +152,7 @@ prefix, yes_no(c->cpuset_clone_children), prefix, yes_no(c->cpuset_memory_migrate), prefix, cgroup_tasks_max_resolve(&c->tasks_max), -+ prefix, c->freezer_state, ++ prefix, c->freezer_state_v1, prefix, cgroup_device_policy_to_string(c->device_policy), prefix, strempty(disable_controllers_str), prefix, delegate_str, @@ -160,19 +160,19 @@ } } -+ if ((apply_mask & CGROUP_MASK_FREEZER) && !is_local_root) { -+ if (c->freezer_state) -+ (void) set_attribute_and_warn(u, "freezer", "freezer.state", c->freezer_state); ++ if ((apply_mask & CGROUP_MASK_FREEZER) && !is_local_root && cg_all_unified() == 0) { ++ if (c->freezer_state_v1) ++ (void) set_attribute_and_warn(u, "freezer", "freezer.state", c->freezer_state_v1); + } + /* On cgroup v2 we can apply BPF everywhere. On cgroup v1 we apply it everywhere except for the root of * containers, where we leave this to the manager */ if ((apply_mask & (CGROUP_MASK_DEVICES | CGROUP_MASK_BPF_DEVICES)) && @@ -2115,6 +2128,9 @@ static CGroupMask unit_get_cgroup_mask(Unit *u) { - c->cpuset_mems) - mask |= CGROUP_MASK_CPUSET; + unit_has_unified_memory_config(u)) + mask |= CGROUP_MASK_MEMORY; -+ if (c->freezer_accounting || c->freezer_state) ++ if (c->freezer_accounting || c->freezer_state_v1) + mask |= CGROUP_MASK_FREEZER; + if (c->device_allow || @@ -195,7 +195,7 @@ CGroupTasksMax tasks_max; + /* Freezer */ -+ char *freezer_state; ++ char *freezer_state_v1; + /* Settings for systemd-oomd */ ManagedOOMMode moom_swap; @@ -205,11 +205,11 @@ --- a/src/core/dbus-cgroup.c +++ b/src/core/dbus-cgroup.c @@ -493,6 +493,8 @@ const sd_bus_vtable bus_cgroup_vtable = { - SD_BUS_PROPERTY("CPUSetMems", "s", NULL, offsetof(CGroupContext, cpuset_mems), 0), + SD_BUS_PROPERTY("CPUSetMems", "s", NULL, offsetof(CGroupContext, cpuset_mems_v1), 0), SD_BUS_PROPERTY("CPUSetCloneChildren", "b", bus_property_get_bool, offsetof(CGroupContext, cpuset_clone_children), 0), SD_BUS_PROPERTY("CPUSetMemMigrate", "b", bus_property_get_bool, offsetof(CGroupContext, cpuset_memory_migrate), 0), + SD_BUS_PROPERTY("FreezerAccounting", "b", bus_property_get_bool, offsetof(CGroupContext, freezer_accounting), 0), -+ SD_BUS_PROPERTY("FreezerState", "s", NULL, offsetof(CGroupContext, freezer_state), 0), ++ SD_BUS_PROPERTY("FreezerState", "s", NULL, offsetof(CGroupContext, freezer_state_v1), 0), SD_BUS_PROPERTY("DevicePolicy", "s", property_get_cgroup_device_policy, offsetof(CGroupContext, device_policy), 0), SD_BUS_PROPERTY("DeviceAllow", "a(ss)", property_get_device_allow, 0, 0), SD_BUS_PROPERTY("TasksAccounting", "b", bus_property_get_bool, offsetof(CGroupContext, tasks_accounting), 0), @@ -237,13 +237,13 @@ + if (!UNIT_WRITE_FLAGS_NOOP(flags)) { + unit_invalidate_cgroup(u, CGROUP_MASK_FREEZER); + -+ if (c->freezer_state) { -+ free(c->freezer_state); -+ c->freezer_state = NULL; ++ if (c->freezer_state_v1) { ++ free(c->freezer_state_v1); ++ c->freezer_state_v1 = NULL; + } + -+ c->freezer_state = strdup(state); -+ if (!c->freezer_state) ++ c->freezer_state_v1 = strdup(state); ++ if (!c->freezer_state_v1) + return -ENOMEM; + + unit_write_settingf(u, flags, name, "FreezerState=%s", state); @@ -271,11 +271,11 @@ --- a/src/core/load-fragment-gperf.gperf.in +++ b/src/core/load-fragment-gperf.gperf.in @@ -226,6 +226,8 @@ - {{type}}.CPUSetMems, config_parse_cpuset_cpumems, 0, offsetof({{type}}, cgroup_context.cpuset_mems) + {{type}}.CPUSetMems, config_parse_cpuset_cpumems, 0, offsetof({{type}}, cgroup_context.cpuset_mems_v1) {{type}}.CPUSetCloneChildren, config_parse_bool, 0, offsetof({{type}}, cgroup_context.cpuset_clone_children) {{type}}.CPUSetMemMigrate, config_parse_bool, 0, offsetof({{type}}, cgroup_context.cpuset_memory_migrate) +{{type}}.FreezerAccounting, config_parse_bool, 0, offsetof({{type}}, cgroup_context.freezer_accounting) -+{{type}}.FreezerState, config_parse_freezer_state, 0, offsetof({{type}}, cgroup_context.freezer_state) ++{{type}}.FreezerState, config_parse_freezer_state, 0, offsetof({{type}}, cgroup_context.freezer_state_v1) {{type}}.DeviceAllow, config_parse_device_allow, 0, offsetof({{type}}, cgroup_context) {{type}}.DevicePolicy, config_parse_device_policy, 0, offsetof({{type}}, cgroup_context.device_policy) {{type}}.IOAccounting, config_parse_bool, 0, offsetof({{type}}, cgroup_context.io_accounting) @@ -511,11 +511,11 @@ TEST(cg_mask_to_string) { test_cg_mask_to_string_one(0, NULL); -- test_cg_mask_to_string_one(_CGROUP_MASK_ALL, "cpu cpuacct cpuset2 io blkio memory devices pids cpuset bpf-firewall bpf-devices bpf-foreign bpf-socket-bind bpf-restrict-network-interfaces"); -+ test_cg_mask_to_string_one(_CGROUP_MASK_ALL, "cpu cpuacct cpuset2 io blkio memory devices pids cpuset freezer bpf-firewall bpf-devices bpf-foreign bpf-socket-bind bpf-restrict-network-interfaces"); +- test_cg_mask_to_string_one(_CGROUP_MASK_ALL, "cpu cpuacct cpuset io blkio memory devices pids bpf-firewall bpf-devices bpf-foreign bpf-socket-bind bpf-restrict-network-interfaces"); ++ test_cg_mask_to_string_one(_CGROUP_MASK_ALL, "cpu cpuacct cpuset io blkio memory devices pids freezer bpf-firewall bpf-devices bpf-foreign bpf-socket-bind bpf-restrict-network-interfaces"); test_cg_mask_to_string_one(CGROUP_MASK_CPU, "cpu"); test_cg_mask_to_string_one(CGROUP_MASK_CPUACCT, "cpuacct"); - test_cg_mask_to_string_one(CGROUP_MASK_CPUSET2, "cpuset2"); + test_cg_mask_to_string_one(CGROUP_MASK_CPUSET, "cpuset"); diff --git a/test/fuzz/fuzz-unit-file/directives-all.service b/test/fuzz/fuzz-unit-file/directives-all.service index 0e953f2..123c98e 100644 --- a/test/fuzz/fuzz-unit-file/directives-all.service
View file
_service:tar_scm:core-cgroup-support-memorysw.patch
Changed
@@ -41,8 +41,8 @@ prefix, c->startup_memory_zswap_max, format_cgroup_memory_limit_comparison(cdk, sizeof(cdk), u, "StartupMemoryZSwapMax"), prefix, c->memory_limit, + prefix, c->memory_memsw_limit, - prefix, c->cpuset_cpus, - prefix, c->cpuset_mems, + prefix, c->cpuset_cpus_v1, + prefix, c->cpuset_mems_v1, prefix, yes_no(c->cpuset_clone_children), @@ -1908,14 +1911,17 @@ static void cgroup_context_apply( @@ -107,8 +107,8 @@ SD_BUS_PROPERTY("MemoryLimit", "t", NULL, offsetof(CGroupContext, memory_limit), 0), + SD_BUS_PROPERTY("MemoryMemswLimit", "t", NULL, offsetof(CGroupContext, memory_memsw_limit), 0), SD_BUS_PROPERTY("CPUSetAccounting", "b", bus_property_get_bool, offsetof(CGroupContext, cpuset_accounting), 0), - SD_BUS_PROPERTY("CPUSetCpus", "s", NULL, offsetof(CGroupContext, cpuset_cpus), 0), - SD_BUS_PROPERTY("CPUSetMems", "s", NULL, offsetof(CGroupContext, cpuset_mems), 0), + SD_BUS_PROPERTY("CPUSetCpus", "s", NULL, offsetof(CGroupContext, cpuset_cpus_v1), 0), + SD_BUS_PROPERTY("CPUSetMems", "s", NULL, offsetof(CGroupContext, cpuset_mems_v1), 0), @@ -1243,6 +1244,9 @@ int bus_cgroup_set_property( if (streq(name, "MemoryLimit")) return bus_cgroup_set_memory(u, name, &c->memory_limit, message, flags, error); @@ -129,8 +129,8 @@ {{type}}.MemoryLimit, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) +{{type}}.MemoryMemswLimit, config_parse_memory_limit, 0, offsetof({{type}}, cgroup_context) {{type}}.CPUSetAccounting, config_parse_bool, 0, offsetof({{type}}, cgroup_context.cpuset_accounting) - {{type}}.CPUSetCpus, config_parse_cpuset_cpumems, 0, offsetof({{type}}, cgroup_context.cpuset_cpus) - {{type}}.CPUSetMems, config_parse_cpuset_cpumems, 0, offsetof({{type}}, cgroup_context.cpuset_mems) + {{type}}.CPUSetCpus, config_parse_cpuset_cpumems, 0, offsetof({{type}}, cgroup_context.cpuset_cpus_v1) + {{type}}.CPUSetMems, config_parse_cpuset_cpumems, 0, offsetof({{type}}, cgroup_context.cpuset_mems_v1) diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 8648fb1..aaf906f 100644 --- a/src/core/load-fragment.c
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/systemd.git</param> - <param name="revision">openEuler-24.03-LTS-Next</param> + <param name="revision">openEuler-24.03-LTS-SP1</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2