forked from pool/systemd
ebea3f9a92
5003-cgroup-rename-TasksMax-structure-to-CGroupTasksMax.patch 5004-bus-print-properties-ignore-CGROUP_LIMIT_MAX-for-Mem.patch 5005-bus-print-properties-prettify-more-unset-properties.patch 5006-cgroup-Add-EffectiveMemoryMax-EffectiveMemoryHigh-an.patch 5007-test-Convert-rlimit-test-to-subtest-of-generic-limit.patch 5008-test-Add-effective-cgroup-limits-testing.patch 5009-cgroup-Restrict-effective-limits-with-global-resourc.patch 5010-cgroup-Rename-effective-limits-internal-table.patch They are temporarily put in quarantine to get broader testing but should be eventually moved to the git repo. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1485
39 lines
2.4 KiB
Diff
39 lines
2.4 KiB
Diff
From 278ef74e90a13821fc2209eb09de768035e14478 Mon Sep 17 00:00:00 2001
|
|
From: Mike Yuan <me@yhndnzj.com>
|
|
Date: Tue, 23 Jan 2024 11:30:16 +0100
|
|
Subject: [PATCH 5005/5011] bus-print-properties: prettify more unset
|
|
properties
|
|
|
|
(cherry picked from commit bfb6b1214a8da947cb82fed2eec3d7f2b1c6175f)
|
|
|
|
[mkoutny: Handle MemoryAvailable= separately.]
|
|
---
|
|
src/shared/bus-print-properties.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/shared/bus-print-properties.c b/src/shared/bus-print-properties.c
|
|
index 46724c98fa..f74d8994ad 100644
|
|
--- a/src/shared/bus-print-properties.c
|
|
+++ b/src/shared/bus-print-properties.c
|
|
@@ -157,13 +157,15 @@ static int bus_print_property(const char *name, const char *expected_value, sd_b
|
|
else if ((STR_IN_SET(name, "CPUWeight", "StartupCPUWeight", "IOWeight", "StartupIOWeight") && u == CGROUP_WEIGHT_INVALID) ||
|
|
(STR_IN_SET(name, "CPUShares", "StartupCPUShares") && u == CGROUP_CPU_SHARES_INVALID) ||
|
|
(STR_IN_SET(name, "BlockIOWeight", "StartupBlockIOWeight") && u == CGROUP_BLKIO_WEIGHT_INVALID) ||
|
|
- (STR_IN_SET(name, "MemoryCurrent", "TasksCurrent") && u == UINT64_MAX) ||
|
|
+ (STR_IN_SET(name, "MemoryCurrent", "MemoryAvailable", "TasksCurrent") && u == UINT64_MAX) ||
|
|
(startswith(name, "Memory") && ENDSWITH_SET(name, "Current") && u == CGROUP_LIMIT_MAX) ||
|
|
+ (startswith(name, "IO") && ENDSWITH_SET(name, "Bytes", "Operations") && u == UINT64_MAX) ||
|
|
(endswith(name, "NSec") && u == UINT64_MAX))
|
|
|
|
bus_print_property_value(name, expected_value, flags, "[not set]");
|
|
|
|
- else if ((STR_IN_SET(name, "DefaultMemoryLow", "DefaultMemoryMin", "MemoryLow", "MemoryHigh", "MemoryMax", "MemorySwapMax", "MemoryZSwapMax", "MemoryLimit", "MemoryAvailable") && u == CGROUP_LIMIT_MAX) ||
|
|
+ else if ((ENDSWITH_SET(name, "MemoryLow", "MemoryMin", "MemoryHigh", "MemoryMax", "MemorySwapMax", "MemoryZSwapMax", "MemoryLimit") &&
|
|
+ u == CGROUP_LIMIT_MAX) ||
|
|
(STR_IN_SET(name, "TasksMax", "DefaultTasksMax") && u == UINT64_MAX) ||
|
|
(startswith(name, "Limit") && u == UINT64_MAX) ||
|
|
(startswith(name, "DefaultLimit") && u == UINT64_MAX))
|
|
--
|
|
2.35.3
|
|
|