[PATCH] sched/fair: Remove unused function and related comment

Ke Zhao posted 1 patch 9 months ago
There is a newer version of this series
kernel/sched/fair.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
[PATCH] sched/fair: Remove unused function and related comment
Posted by Ke Zhao 9 months ago
Different from min_vruntime(), there is no function actually
using max_vruntime() now. So there is no reason to keep it,
just remove this function and related comment.

Signed-off-by: Ke Zhao <zhaoke09@baidu.com>
---
 kernel/sched/fair.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index eb5a2572b4f8..e78a3c16a845 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -526,15 +526,6 @@ void account_cfs_rq_runtime(struct cfs_rq *cfs_rq, u64 delta_exec);
  * Scheduling class tree data structure manipulation methods:
  */
 
-static inline __maybe_unused u64 max_vruntime(u64 max_vruntime, u64 vruntime)
-{
-	s64 delta = (s64)(vruntime - max_vruntime);
-	if (delta > 0)
-		max_vruntime = vruntime;
-
-	return max_vruntime;
-}
-
 static inline __maybe_unused u64 min_vruntime(u64 min_vruntime, u64 vruntime)
 {
 	s64 delta = (s64)(vruntime - min_vruntime);
@@ -745,9 +736,7 @@ int entity_eligible(struct cfs_rq *cfs_rq, struct sched_entity *se)
 static u64 __update_min_vruntime(struct cfs_rq *cfs_rq, u64 vruntime)
 {
 	u64 min_vruntime = cfs_rq->min_vruntime;
-	/*
-	 * open coded max_vruntime() to allow updating avg_vruntime
-	 */
+
 	s64 delta = (s64)(vruntime - min_vruntime);
 	if (delta > 0) {
 		avg_vruntime_update(cfs_rq, delta);
-- 
2.39.3 (Apple Git-146)