Skip to contentSkip to conversation

sched/fair: Remove stale references to LAST_BUDDY and SKIP_BUDDY

PATCH In review Madadi Vineeth Reddy 1 participant 3 messages Mar 14, 2025 – Aug 7, 2025 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched/fair: Remove stale references to LAST_BUDDY and SKIP_BUDDY

Commit 5e963f2bd465 ("sched/fair: Commit to EEVDF") removed the functionality associated with LAST_BUDDY and SKIP_BUDDY. However, some outdated references remained in the comments for pick_next_entity and check_preempt_wakeup_fair. This commit cleans up those comments to maintain clarity and correctness.

No functional change intended.

---
 kernel/sched/fair.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
kernel/sched/fair.c +1 -5
index 9dafb374d76d..379dbcbb24e9 100644
@@ -5578,8 +5578,6 @@ static int dequeue_entities(struct rq *rq, struct sched_entity *se, int flags);
  * Pick the next process, keeping these things in mind, in this order:
  * 1) keep things fair between processes/task groups
  * 2) pick the "next" process, since someone really wants that to run
- * 3) pick the "last" process, for cache locality
- * 4) do not run the "skip" process, if something else is available
  */
 static struct sched_entity *
 pick_next_entity(struct rq *rq, struct cfs_rq *cfs_rq)
@@ -8780,9 +8778,7 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int
 	 *
 	 * Note: this also catches the edge-case of curr being in a throttled
 	 * group (e.g. via set_curr_task), since update_curr() (in the
-	 * enqueue of curr) will have resulted in resched being set.  This
-	 * prevents us from potentially nominating it as a false LAST_BUDDY
-	 * below.
+	 * enqueue of curr) will have resulted in resched being set.
 	 */
 	if (test_tsk_need_resched(rq->curr))
 		return;
Signature · 1 line
2.43.5
#1 lore raw

Hi Peter, Ingo,

Ping.

Any thoughts on this? Can it be picked up?

Thanks,
Madadi Vineeth Reddy

Quoted 39 lines · Madadi Vineeth Reddy

Commit 5e963f2bd465 ("sched/fair: Commit to EEVDF") removed the functionality associated with LAST_BUDDY and SKIP_BUDDY. However, some outdated references remained in the comments for pick_next_entity and check_preempt_wakeup_fair. This commit cleans up those comments to maintain clarity and correctness.

No functional change intended.

---
 kernel/sched/fair.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
kernel/sched/fair.c +1 -5
index 9dafb374d76d..379dbcbb24e9 100644
@@ -5578,8 +5578,6 @@ static int dequeue_entities(struct rq *rq, struct sched_entity *se, int flags);
  * Pick the next process, keeping these things in mind, in this order:
  * 1) keep things fair between processes/task groups
  * 2) pick the "next" process, since someone really wants that to run
- * 3) pick the "last" process, for cache locality
- * 4) do not run the "skip" process, if something else is available
  */
 static struct sched_entity *
 pick_next_entity(struct rq *rq, struct cfs_rq *cfs_rq)
@@ -8780,9 +8778,7 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int
 	 *
 	 * Note: this also catches the edge-case of curr being in a throttled
 	 * group (e.g. via set_curr_task), since update_curr() (in the
-	 * enqueue of curr) will have resulted in resched being set.  This
-	 * prevents us from potentially nominating it as a false LAST_BUDDY
-	 * below.
+	 * enqueue of curr) will have resulted in resched being set.
 	 */
 	if (test_tsk_need_resched(rq->curr))
 		return;
#2 lore raw
Quoted 8 lines · Madadi Vineeth Reddy

Hi Peter, Ingo,

Ping.

Any thoughts on this? Can it be picked up?

Thanks,
Madadi Vineeth Reddy

Hi Peter, Ingo,

This still applies cleanly on top of tip/sched/core.

Could this be considered for merging?

Thank you,
Madadi Vineeth Reddy

Quoted 42 lines · Madadi Vineeth Reddy
Quoted 39 lines

Commit 5e963f2bd465 ("sched/fair: Commit to EEVDF") removed the functionality associated with LAST_BUDDY and SKIP_BUDDY. However, some outdated references remained in the comments for pick_next_entity and check_preempt_wakeup_fair. This commit cleans up those comments to maintain clarity and correctness.

No functional change intended.

---
 kernel/sched/fair.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
kernel/sched/fair.c +1 -5
index 9dafb374d76d..379dbcbb24e9 100644
@@ -5578,8 +5578,6 @@ static int dequeue_entities(struct rq *rq, struct sched_entity *se, int flags);
  * Pick the next process, keeping these things in mind, in this order:
  * 1) keep things fair between processes/task groups
  * 2) pick the "next" process, since someone really wants that to run
- * 3) pick the "last" process, for cache locality
- * 4) do not run the "skip" process, if something else is available
  */
 static struct sched_entity *
 pick_next_entity(struct rq *rq, struct cfs_rq *cfs_rq)
@@ -8780,9 +8778,7 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int
 	 *
 	 * Note: this also catches the edge-case of curr being in a throttled
 	 * group (e.g. via set_curr_task), since update_curr() (in the
-	 * enqueue of curr) will have resulted in resched being set.  This
-	 * prevents us from potentially nominating it as a false LAST_BUDDY
-	 * below.
+	 * enqueue of curr) will have resulted in resched being set.
 	 */
 	if (test_tsk_need_resched(rq->curr))
 		return;