lkml.org 
[lkml]   [2023]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] cgroup: /proc/cgroups output alignment
Date
/proc/cgroups output alignment for easy read

Signed-off-by: liuq <liuq131@chinatelecom.cn>
---
kernel/cgroup/cgroup-v1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c
index 52bb5a74a23b..ff82d61ae76f 100644
--- a/kernel/cgroup/cgroup-v1.c
+++ b/kernel/cgroup/cgroup-v1.c
@@ -670,14 +670,14 @@ int proc_cgroupstats_show(struct seq_file *m, void *v)
struct cgroup_subsys *ss;
int i;

- seq_puts(m, "#subsys_name\thierarchy\tnum_cgroups\tenabled\n");
+ seq_puts(m, "#subsys_name hierarchy num_cgroups enabled\n");
/*
* Grab the subsystems state racily. No need to add avenue to
* cgroup_mutex contention.
*/

for_each_subsys(ss, i)
- seq_printf(m, "%s\t%d\t%d\t%d\n",
+ seq_printf(m, "%-20s%-14d%-14d%-14d\n",
ss->legacy_name, ss->root->hierarchy_id,
atomic_read(&ss->root->nr_cgrps),
cgroup_ssid_enabled(i));
--
2.27.0
\
 
 \ /
  Last update: 2023-03-27 00:01    [W:0.024 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site