Commit af5a3fae authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'sched-urgent-2026-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:

 - Fix PELT clock synchronization bug when entering idle

 - Disable the NEXT_BUDDY feature, as during extensive testing
   Mel found that the negatives outweigh the positives

 - Make wakeup preemption less aggressive, which resulted in
   an unreasonable increase in preemption frequency

* tag 'sched-urgent-2026-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/fair: Revert force wakeup preemption
  sched/fair: Disable scheduler feature NEXT_BUDDY
  sched/fair: Fix pelt clock sync when entering idle
parents ceaeaf66 15257cc2
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -8828,16 +8828,6 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int
	if ((wake_flags & WF_FORK) || pse->sched_delayed)
		return;

	/*
	 * If @p potentially is completing work required by current then
	 * consider preemption.
	 *
	 * Reschedule if waker is no longer eligible. */
	if (in_task() && !entity_eligible(cfs_rq, se)) {
		preempt_action = PREEMPT_WAKEUP_RESCHED;
		goto preempt;
	}

	/* Prefer picking wakee soon if appropriate. */
	if (sched_feat(NEXT_BUDDY) &&
	    set_preempt_buddy(cfs_rq, wake_flags, pse, se)) {
@@ -8995,12 +8985,6 @@ pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf
			goto again;
	}

	/*
	 * rq is about to be idle, check if we need to update the
	 * lost_idle_time of clock_pelt
	 */
	update_idle_rq_clock_pelt(rq);

	return NULL;
}

+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ SCHED_FEAT(PREEMPT_SHORT, true)
 * wakeup-preemption), since its likely going to consume data we
 * touched, increases cache locality.
 */
SCHED_FEAT(NEXT_BUDDY, true)
SCHED_FEAT(NEXT_BUDDY, false)

/*
 * Allow completely ignoring cfs_rq->next; which can be set from various
+6 −0
Original line number Diff line number Diff line
@@ -468,6 +468,12 @@ static void set_next_task_idle(struct rq *rq, struct task_struct *next, bool fir
	scx_update_idle(rq, true, true);
	schedstat_inc(rq->sched_goidle);
	next->se.exec_start = rq_clock_task(rq);

	/*
	 * rq is about to be idle, check if we need to update the
	 * lost_idle_time of clock_pelt
	 */
	update_idle_rq_clock_pelt(rq);
}

struct task_struct *pick_task_idle(struct rq *rq, struct rq_flags *rf)