summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJP Kobryn <inwardvessel@gmail.com>2025-04-03 18:10:48 -0700
committerTejun Heo <tj@kernel.org>2025-04-04 10:06:25 -1000
commita97915559f5c5ff1972d678b94fd460c72a3b5f2 (patch)
treea6024fb9076c05066946ed750ee5b552aa4e2e4b /include
parent845a7245801142bfff411bc84afa8cdbc789562f (diff)
downloadlinux-a97915559f5c5ff1972d678b94fd460c72a3b5f2.tar.gz
linux-a97915559f5c5ff1972d678b94fd460c72a3b5f2.zip
cgroup: change rstat function signatures from cgroup-based to css-based
This non-functional change serves as preparation for moving to subsystem-based rstat trees. To simplify future commits, change the signatures of existing cgroup-based rstat functions to become css-based and rename them to reflect that. Though the signatures have changed, the implementations have not. Within these functions use the css->cgroup pointer to obtain the associated cgroup and allow code to function the same just as it did before this patch. At applicable call sites, pass the subsystem-specific css pointer as an argument or pass a pointer to cgroup::self if not in subsystem context. Note that cgroup_rstat_updated_list() and cgroup_rstat_push_children() are not altered yet since there would be a larger amount of css to cgroup conversions which may overcomplicate the code at this intermediate phase. Signed-off-by: JP Kobryn <inwardvessel@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cgroup-defs.h2
-rw-r--r--include/linux/cgroup.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
index 1bf2e8db6dac..e58bfb880111 100644
--- a/include/linux/cgroup-defs.h
+++ b/include/linux/cgroup-defs.h
@@ -536,7 +536,7 @@ struct cgroup {
/*
* A singly-linked list of cgroup structures to be rstat flushed.
* This is a scratch field to be used exclusively by
- * cgroup_rstat_flush_locked() and protected by cgroup_rstat_lock.
+ * css_rstat_flush_locked() and protected by cgroup_rstat_lock.
*/
struct cgroup *rstat_flush_next;
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 65d95bb2199f..1f5b0a4a3356 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -693,8 +693,8 @@ static inline void cgroup_path_from_kernfs_id(u64 id, char *buf, size_t buflen)
/*
* cgroup scalable recursive statistics.
*/
-void cgroup_rstat_updated(struct cgroup *cgrp, int cpu);
-void cgroup_rstat_flush(struct cgroup *cgrp);
+void css_rstat_updated(struct cgroup_subsys_state *css, int cpu);
+void css_rstat_flush(struct cgroup_subsys_state *css);
/*
* Basic resource stats.