Skip to content

Commit af5a3fa

Browse files
committed
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
2 parents ceaeaf6 + 15257cc commit af5a3fa

3 files changed

Lines changed: 7 additions & 17 deletions

File tree

kernel/sched/fair.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8828,16 +8828,6 @@ static void check_preempt_wakeup_fair(struct rq *rq, struct task_struct *p, int
88288828
if ((wake_flags & WF_FORK) || pse->sched_delayed)
88298829
return;
88308830

8831-
/*
8832-
* If @p potentially is completing work required by current then
8833-
* consider preemption.
8834-
*
8835-
* Reschedule if waker is no longer eligible. */
8836-
if (in_task() && !entity_eligible(cfs_rq, se)) {
8837-
preempt_action = PREEMPT_WAKEUP_RESCHED;
8838-
goto preempt;
8839-
}
8840-
88418831
/* Prefer picking wakee soon if appropriate. */
88428832
if (sched_feat(NEXT_BUDDY) &&
88438833
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
89958985
goto again;
89968986
}
89978987

8998-
/*
8999-
* rq is about to be idle, check if we need to update the
9000-
* lost_idle_time of clock_pelt
9001-
*/
9002-
update_idle_rq_clock_pelt(rq);
9003-
90048988
return NULL;
90058989
}
90068990

kernel/sched/features.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SCHED_FEAT(PREEMPT_SHORT, true)
2929
* wakeup-preemption), since its likely going to consume data we
3030
* touched, increases cache locality.
3131
*/
32-
SCHED_FEAT(NEXT_BUDDY, true)
32+
SCHED_FEAT(NEXT_BUDDY, false)
3333

3434
/*
3535
* Allow completely ignoring cfs_rq->next; which can be set from various

kernel/sched/idle.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,12 @@ static void set_next_task_idle(struct rq *rq, struct task_struct *next, bool fir
468468
scx_update_idle(rq, true, true);
469469
schedstat_inc(rq->sched_goidle);
470470
next->se.exec_start = rq_clock_task(rq);
471+
472+
/*
473+
* rq is about to be idle, check if we need to update the
474+
* lost_idle_time of clock_pelt
475+
*/
476+
update_idle_rq_clock_pelt(rq);
471477
}
472478

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

0 commit comments

Comments
 (0)