summaryrefslogtreecommitdiff
path: root/src/cgtop/cgtop.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@fb.com>2016-08-15 18:13:36 -0400
committerTejun Heo <tj@kernel.org>2016-08-15 18:13:36 -0400
commitca2f6384aa2076576b316c7253964be90b102d96 (patch)
treef787c7b2562c217f07bdeaefd34be64a72993162 /src/cgtop/cgtop.c
parent5f9a610ad2b3200a31bbd9181c810726eeb30385 (diff)
core: rename cg_unified() to cg_all_unified()
A following patch will update cgroup handling so that the systemd controller (/sys/fs/cgroup/systemd) can use the unified hierarchy even if the kernel resource controllers are on the legacy hierarchies. This would require distinguishing whether all controllers are on cgroup v2 or only the systemd controller is. In preparation, this patch renames cg_unified() to cg_all_unified(). This patch doesn't cause any functional changes.
Diffstat (limited to 'src/cgtop/cgtop.c')
-rw-r--r--src/cgtop/cgtop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index 6045ae0437..aba17c9829 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -213,7 +213,7 @@ static int process(
uint64_t new_usage;
nsec_t timestamp;
- if (cg_unified() > 0) {
+ if (cg_all_unified() > 0) {
const char *keys[] = { "usage_usec", NULL };
_cleanup_free_ char *val = NULL;
@@ -273,7 +273,7 @@ static int process(
} else if (streq(controller, "memory")) {
_cleanup_free_ char *p = NULL, *v = NULL;
- if (cg_unified() <= 0)
+ if (cg_all_unified() <= 0)
r = cg_get_path(controller, path, "memory.usage_in_bytes", &p);
else
r = cg_get_path(controller, path, "memory.current", &p);
@@ -293,11 +293,11 @@ static int process(
if (g->memory > 0)
g->memory_valid = true;
- } else if ((streq(controller, "io") && cg_unified() > 0) ||
- (streq(controller, "blkio") && cg_unified() <= 0)) {
+ } else if ((streq(controller, "io") && cg_all_unified() > 0) ||
+ (streq(controller, "blkio") && cg_all_unified() <= 0)) {
_cleanup_fclose_ FILE *f = NULL;
_cleanup_free_ char *p = NULL;
- bool unified = cg_unified() > 0;
+ bool unified = cg_all_unified() > 0;
uint64_t wr = 0, rd = 0;
nsec_t timestamp;