systemd/5004-bus-print-properties-ignore-CGROUP_LIMIT_MAX-for-Mem.patch
Franck Bui ebea3f9a92 - Add patches that implement [jsc#PED-5659]
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
2024-01-23 13:52:53 +00:00

32 lines
1.5 KiB
Diff

From c44ecd40ed4b4221dd9f03f5c2090d994889064c Mon Sep 17 00:00:00 2001
From: Mike Yuan <me@yhndnzj.com>
Date: Tue, 23 Jan 2024 11:30:15 +0100
Subject: [PATCH 5004/5011] bus-print-properties: ignore CGROUP_LIMIT_MAX for
Memory*{Current, Peak}
MemoryCurrent and MemoryAvailable are shown as "[not set]" when UINT64_MAX
(unset). Let's do the same for the newly-added Memory*{Current,Peak} properties.
(cherry picked from commit 3f362012ce0034dc14d3c1a1c2a3a64a11efa9da)
[mkoutny: Drop MemoryPeak=]
---
src/shared/bus-print-properties.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/shared/bus-print-properties.c b/src/shared/bus-print-properties.c
index db41ad2495..46724c98fa 100644
--- a/src/shared/bus-print-properties.c
+++ b/src/shared/bus-print-properties.c
@@ -158,6 +158,7 @@ static int bus_print_property(const char *name, const char *expected_value, sd_b
(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) ||
+ (startswith(name, "Memory") && ENDSWITH_SET(name, "Current") && u == CGROUP_LIMIT_MAX) ||
(endswith(name, "NSec") && u == UINT64_MAX))
bus_print_property_value(name, expected_value, flags, "[not set]");
--
2.35.3