Skip to content

6.18: fix BORE Scheduler - #178

Open
LFRon wants to merge 1 commit into
CachyOS:masterfrom
LFRon:6.18/bore-fix
Open

6.18: fix BORE Scheduler#178
LFRon wants to merge 1 commit into
CachyOS:masterfrom
LFRon:6.18/bore-fix

Conversation

@LFRon

@LFRon LFRon commented Aug 7, 2026

Copy link
Copy Markdown

…scheduler rework

The BORE 6.6.3 patch failed to apply on 6.18.42. Only one hunk broke: Hunk #23 in kernel/sched/fair.c, because check_preempt_wakeup_fair() was substantially reworked upstream and none of its context lines exist anymore:

  • __pick_eevdf(cfs_rq, !do_preempt_short) was replaced by pick_next_entity() + "if (nse == pse) goto preempt;"
  • the do_preempt_short boolean was replaced by the preempt_wakeup_action enum (PREEMPT_WAKEUP_SHORT/PICK/...)
  • an extra "!nse && cfs_rq->nr_queued" re-pick block was inserted before the RUN_TO_PARITY protect path

Adapt the hunk to the new structure while preserving BORE semantics: insert the penalty-based short-preempt right after "if (nse == pse) goto preempt;" (the structural equivalent of the old "if (__pick_eevdf(...) == pse) goto preempt;" spot) and map the trigger

do_preempt_short = true; goto preempt;

to the new short-preempt equivalent

preempt_action = PREEMPT_WAKEUP_SHORT; goto preempt;

which the preempt: label handles as cancel_protect_slice(se) + resched_curr_lazy(rq) -- exactly the old short-preempt behaviour.

The BORE condition itself (sched_bore_key + PREEMPT_SHORT_BORE + both entities are tasks + waker penalty < current penalty) is unchanged. No kernel-original control flow is altered: on the non-BORE path the !nse re-pick and RUN_TO_PARITY protect logic remain intact.

The remaining 24 hunks are untouched (byte-identical). The full patch now applies cleanly to 6.18.42 with zero fuzz and zero rejects (verified with patch -p1 --dry-run -F0).

@LFRon
LFRon marked this pull request as draft August 7, 2026 11:42
…uler rework

The BORE 6.6.3 patch failed to apply on 6.18.42. Only one hunk broke:
Hunk CachyOS#23 in kernel/sched/fair.c, because check_preempt_wakeup_fair()
was substantially reworked upstream and none of its context lines exist
anymore:

  - __pick_eevdf(cfs_rq, !do_preempt_short) was replaced by
    pick_next_entity() + "if (nse == pse) goto preempt;"
  - the do_preempt_short boolean was replaced by the
    preempt_wakeup_action enum (PREEMPT_WAKEUP_SHORT/PICK/...)
  - an extra "!nse && cfs_rq->nr_queued" re-pick block was inserted
    before the RUN_TO_PARITY protect path

Adapt the hunk to the new structure while preserving BORE semantics:
insert the penalty-based short-preempt right after "if (nse == pse)
goto preempt;" (the structural equivalent of the old
"if (__pick_eevdf(...) == pse) goto preempt;" spot) and map the trigger

    do_preempt_short = true; goto preempt;

to the new short-preempt equivalent

    preempt_action = PREEMPT_WAKEUP_SHORT; goto preempt;

which the preempt: label handles as cancel_protect_slice(se) +
resched_curr_lazy(rq) -- exactly the old short-preempt behaviour.

The BORE condition itself (sched_bore_key + PREEMPT_SHORT_BORE +
both entities are tasks + waker penalty < current penalty) is
unchanged. No kernel-original control flow is altered: on the non-BORE
path the !nse re-pick and RUN_TO_PARITY protect logic remain intact.

The remaining 24 hunks are untouched (byte-identical). The full patch
now applies cleanly to 6.18.42 with zero fuzz and zero rejects
(verified with `patch -p1 --dry-run -F0`).
@LFRon
LFRon marked this pull request as ready for review August 7, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant