6.18: fix BORE Scheduler - #178
Open
LFRon wants to merge 1 commit into
Open
Conversation
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
marked this pull request as ready for review
August 7, 2026 11:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…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:
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
to the new short-preempt equivalent
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).