[PATCH 3/3] sched/psi: Remove redundant cgroup_psi() when !CONFIG_CGROUPS

Hao Jia posted 3 patches 3 years, 8 months ago
[PATCH 3/3] sched/psi: Remove redundant cgroup_psi() when !CONFIG_CGROUPS
Posted by Hao Jia 3 years, 8 months ago
cgroup_psi() is only called under CONFIG_CGROUPS.
We don't need cgroup_psi() when !CONFIG_CGROUPS,
so we can remove it in this case.

Signed-off-by: Hao Jia <jiahao.os@bytedance.com>
---
 include/linux/cgroup.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index ed53bfe7c46c..ac5d0515680e 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -734,11 +734,6 @@ static inline struct cgroup *cgroup_parent(struct cgroup *cgrp)
 	return NULL;
 }
 
-static inline struct psi_group *cgroup_psi(struct cgroup *cgrp)
-{
-	return NULL;
-}
-
 static inline bool cgroup_psi_enabled(void)
 {
 	return false;
-- 
2.32.0
Re: [PATCH 3/3] sched/psi: Remove redundant cgroup_psi() when !CONFIG_CGROUPS
Posted by Johannes Weiner 3 years, 8 months ago
On Sat, Aug 06, 2022 at 08:05:10PM +0800, Hao Jia wrote:
> cgroup_psi() is only called under CONFIG_CGROUPS.
> We don't need cgroup_psi() when !CONFIG_CGROUPS,
> so we can remove it in this case.
> 
> Signed-off-by: Hao Jia <jiahao.os@bytedance.com>

Acked-by: Johannes Weiner <hannes@cmpxchg.org>