Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP6:Update
systemd
1019-cgroup-Add-EffectiveMemoryMax-compatibilit...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1019-cgroup-Add-EffectiveMemoryMax-compatibility-for-cgro.patch of Package systemd
From 29adc840dc92c75be02d13e56f602bac57130e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com> Date: Tue, 23 Jan 2024 11:30:22 +0100 Subject: [PATCH] cgroup: Add EffectiveMemoryMax= compatibility for cgroup v1 There is no EffectiveMemoryLimit= but in the case a unit has the legacy directives only, MemoryLimit= will be used when calculating effective limit. This is consistent with the value that is actually applied by systemd when configuring the cgroup. [mkoutny: jsc#PED-5659] --- src/core/cgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/cgroup.c b/src/core/cgroup.c index 2d8d61a26d..6e4b681021 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -4020,9 +4020,9 @@ static uint64_t unit_get_effective_limit_one(Unit *u, CGroupLimitType type) { cc = unit_get_cgroup_context(u); switch (type) { /* Note: on legacy/hybrid hierarchies memory_max stays CGROUP_LIMIT_MAX unless configured - * explicitly. Effective value of MemoryLimit= (cgroup v1) is not implemented. */ + * explicitly, look at MemoryLimit= (cgroup v1) too. */ case CGROUP_LIMIT_MEMORY_MAX: - return cc->memory_max; + return unit_has_unified_memory_config(u) ? cc->memory_max : cc->memory_limit; case CGROUP_LIMIT_MEMORY_HIGH: return cc->memory_high; case CGROUP_LIMIT_TASKS_MAX: -- 2.35.3
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