Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP1:GA
systemd-mini.16767
0010-core-accept-MemorySwapMax-properties-that-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0010-core-accept-MemorySwapMax-properties-that-are-scaled.patch of Package systemd-mini.16767
From ad2694f396380624e60fa4cdb81584171a7ccb90 Mon Sep 17 00:00:00 2001 From: Lennart Poettering <lennart@poettering.net> Date: Thu, 9 Jul 2020 19:28:10 +0200 Subject: [PATCH 10/15] core: accept MemorySwapMax= properties that are scaled, too Let's do what we already do for MemoryMax= and friends for MemorySwapMax= too. (cherry picked from commit 66a892ae3d5ebaa82298c40012b95534ba34cfb1) [mkoutny: adjust context] [mkoutny: add MemorySwapMaxScale parsing fixup that silently appeared in 13ec20d42a7b7abfbcbca5c6f1ec487fd3e3def8] --- src/core/dbus-cgroup.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c index f299eab49e..6d05c337a1 100644 --- a/src/core/dbus-cgroup.c +++ b/src/core/dbus-cgroup.c @@ -962,7 +962,7 @@ int bus_cgroup_set_property( return 1; - } else if (STR_IN_SET(name, "MemoryLowScale", "MemoryHighScale", "MemoryMaxScale")) { + } else if (STR_IN_SET(name, "MemoryLowScale", "MemoryHighScale", "MemoryMaxScale", "MemorySwapMaxScale")) { uint32_t raw; uint64_t v; @@ -985,7 +985,9 @@ int bus_cgroup_set_property( c->memory_low = v; else if (streq(name, "MemoryHigh")) c->memory_high = v; - else + else if (streq(name, "MemorySwapMax")) + c->memory_swap_max = v; + else /* MemoryMax */ c->memory_max = v; unit_invalidate_cgroup(u, CGROUP_MASK_MEMORY); @@ -1008,7 +1010,7 @@ int bus_cgroup_set_property( c->memory_limit = limit; unit_invalidate_cgroup(u, CGROUP_MASK_MEMORY); - if (limit == (uint64_t) -1) + if (limit == CGROUP_LIMIT_MAX) unit_write_drop_in_private(u, mode, name, "MemoryLimit=infinity"); else unit_write_drop_in_private_format(u, mode, name, "MemoryLimit=%" PRIu64, limit); -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor