1 Star 0 Fork 50

山竹/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0413-cgroup-Check-ancestor-memory-min-for-unified-memory-.patch 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2021-06-16 16:46 . update to systemd-239-45.el8.src.rpm
From 49c990010f48b429b52f73f54d70d529f0d2c7fe Mon Sep 17 00:00:00 2001
From: Chris Down <chris@chrisdown.name>
Date: Mon, 30 Sep 2019 18:24:26 +0100
Subject: [PATCH] cgroup: Check ancestor memory min for unified memory config
Otherwise we might not enable it when we should, ie. DefaultMemoryMin is
set in a parent, but not MemoryMin in the current unit.
(cherry picked from commit 7c9d2b79935d413389a603918a711df75acd3f48)
Related: #1763435
---
src/core/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index d40f9cbc2a..4299923754 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -851,7 +851,7 @@ static bool unit_has_unified_memory_config(Unit *u) {
c = unit_get_cgroup_context(u);
assert(c);
- return c->memory_min > 0 || unit_get_ancestor_memory_low(u) > 0 ||
+ return unit_get_ancestor_memory_min(u) > 0 || unit_get_ancestor_memory_low(u) > 0 ||
c->memory_high != CGROUP_LIMIT_MAX || c->memory_max != CGROUP_LIMIT_MAX ||
c->memory_swap_max != CGROUP_LIMIT_MAX;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangpingping000/systemd.git
git@gitee.com:wangpingping000/systemd.git
wangpingping000
systemd
systemd
a8

搜索帮助