2020-09-07 09:19:28

by Dietmar Eggemann

[permalink] [raw]
Subject: [PATCH 2/3] sched/fair: Remove cfs_rq_tg_path()

cfs_rq_tg_path() is used by a tracepoint-to traceevent (tp-2-te)
converter to format the path of a taskgroup or autogroup respectively.
It doesn't have any in-kernel users after the removal of the
sched_trace_cfs_rq_path() helper function.

cfs_rq_tg_path() can be coded in a tp-2-te converter.

Remove it from kernel/sched/fair.c.

Signed-off-by: Dietmar Eggemann <[email protected]>
---
kernel/sched/fair.c | 19 -------------------
kernel/sched/sched.h | 3 ---
2 files changed, 22 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f7640af1dcaa..7b9b5ed3c506 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -285,19 +285,6 @@ static inline struct cfs_rq *group_cfs_rq(struct sched_entity *grp)
return grp->my_q;
}

-static inline void cfs_rq_tg_path(struct cfs_rq *cfs_rq, char *path, int len)
-{
- if (!path)
- return;
-
- if (cfs_rq && task_group_is_autogroup(cfs_rq->tg))
- autogroup_path(cfs_rq->tg, path, len);
- else if (cfs_rq && cfs_rq->tg->css.cgroup)
- cgroup_path(cfs_rq->tg->css.cgroup, path, len);
- else
- strlcpy(path, "(null)", len);
-}
-
static inline bool list_add_leaf_cfs_rq(struct cfs_rq *cfs_rq)
{
struct rq *rq = rq_of(cfs_rq);
@@ -472,12 +459,6 @@ static inline struct cfs_rq *group_cfs_rq(struct sched_entity *grp)
return NULL;
}

-static inline void cfs_rq_tg_path(struct cfs_rq *cfs_rq, char *path, int len)
-{
- if (path)
- strlcpy(path, "(null)", len);
-}
-
static inline bool list_add_leaf_cfs_rq(struct cfs_rq *cfs_rq)
{
return true;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 28709f6b0975..5f2e9b396161 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -730,7 +730,6 @@ static inline long se_runnable(struct sched_entity *se)
else
return se->runnable_weight;
}
-
#else
#define entity_is_task(se) 1

@@ -1579,7 +1578,6 @@ static inline void set_task_rq(struct task_struct *p, unsigned int cpu)
p->rt.parent = tg->rt_se[cpu];
#endif
}
-
#else /* CONFIG_CGROUP_SCHED */

static inline void set_task_rq(struct task_struct *p, unsigned int cpu) { }
@@ -1587,7 +1585,6 @@ static inline struct task_group *task_group(struct task_struct *p)
{
return NULL;
}
-
#endif /* CONFIG_CGROUP_SCHED */

static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu)
--
2.17.1