Skip to contentSkip to conversation

ss: Tone down cgroup path resolution

PATCH New Michal Koutný 1 participant 3 messages Feb 21, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover ss: Tone down cgroup path resolution

Changes from v1 (https://lore.kernel.org/r/[email protected])
- notice about 'unreachable' in commit message
- add README.devel clarification

Michal Koutný (2):
ss: Tone down cgroup path resolution
README.devel: clarify patch rules

 README.devel | 2 ++
 lib/fs.c     | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
Signature · 1 line
2.48.1
#1 lore raw

PATCH v2 1/2 ss: Tone down cgroup path resolution

Sockets and cgroups have different lifetimes (e.g. fd passing between cgroups) so obtaining a cgroup id to a removed cgroup dir is not an error. Furthermore, the message is printed for each such a socket (which is redundant each such socket's cgroup is shown as 'unreachable'). Improve user experience by silencing these specific errors.

---
 lib/fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/fs.c +2 -1
index 622f28b3..6fe1d6db 100644
@@ -223,7 +223,8 @@ char *get_cgroup2_path(__u64 id, bool full)
 
 	fd = open_by_handle_at(mnt_fd, fhp, 0);
 	if (fd < 0) {
-		fprintf(stderr, "Failed to open cgroup2 by ID\n");
+		if (errno != ESTALE)
+			fprintf(stderr, "Failed to open cgroup2 by ID\n");
 		goto out;
 	}
 
Signature · 1 line
2.48.1
#2 lore raw

PATCH v2 2/2 README.devel: clarify patch rules

In reply to Michal Koutný
---
 README.devel | 2 ++
 1 file changed, 2 insertions(+)
README.devel +2 -0
index 60c95468..1c80a336 100644
@@ -16,3 +16,5 @@ aligned on the mainline Linux kernel (ie follows Linus).
 The iproute2-next repository tracks the code intended for the next
 release; it corresponds with networking development tree (net-next)
 in the kernel.
+Patch submitting rules are akin to kernel
+    https://www.kernel.org/doc/html/latest/process/submitting-patches.html
Signature · 1 line
2.48.1