Skip to contentSkip to conversation

sched/fair: Remove unused function and related comment

PATCH RESEND New Ke Zhao 1 participant 1 message Jun 9, 2025 Scheduler

lore
Share & tools
lore

Ke Zhao

author
#0 lore raw

PATCH RESEND 1/1 sched/fair: Remove unused function and related comment

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.

---
 kernel/sched/fair.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
kernel/sched/fair.c +1 -12
index eb5a2572b4f8..e78a3c16a845 100644
@@ -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);
Signature · 1 line
2.39.3 (Apple Git-146)