Repository navigation
Conversation
The x86 IRQ exit path enters __schedule for every local APIC timer interrupt even when the scheduler has not requested a reschedule. This repeats scheduler bookkeeping and task selection for an otherwise continuing task, and selects the RCU ToKernel disposition unnecessarily. Use NEED_SCHEDULE as the common scheduling predicate for all vectors. Keep the outermost-IRQ restriction, softirq processing, RCU exit handling and scheduler-side preemption checks unchanged. Fair/RT ticks, wakeups and deadline processing continue to publish their existing reschedule requests. Remove the unused APIC timer-vector import. Validation on the same base and patch: normal 2-vCPU guest suites passed 208 timing/scheduling, 27 fair-group and 15 cpuset cases; the explicit mm_selftest+sched_selftest configuration passed 210 cases. The unmodified control passed the same 208 timing/scheduling cases. No test features are enabled by this change. End-to-end sandbox performance remains mixed. Two fixed rounds of 20 measured creates per concurrency showed pooled c1 median improving 182.997 to 173.256 ms, but c5 worsening 280.471 to 762.699 ms and c10 p95 worsening 1017.931 to 1142.505 ms. These observations do not establish the cause of the adverse results or prove absence of performance regression; this change does not claim to complete sandbox creation optimization. Signed-off-by: longjin <longjin@dragonos.org>
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Problem and change
The x86 interrupt exit path calls
__schedule()on every APIC timer interrupt, even whenNEED_SCHEDULEis clear. That repeats scheduler bookkeeping/task selection and chooses the RCUToKerneldisposition without a scheduling request.Use
NEED_SCHEDULEfor every interrupt vector and remove the unused timer-vector import. The outermost-IRQ guard, softirq processing, RCU exit protocol and scheduler-side preemption checks remain in place. Fair/RT ticks, wakeups and deadline processing retain their existing reschedule-request paths. This follows Linux 6.6's request-driven IRQ-exit scheduling model.Validation
Validated against master
2515e3c91828dc7ea6dadbf3c29aff8f0088c58b:make kernel,cargo fmt --all --check, andgit diff --checkpassed.mm_selftest,sched_selftestbuild: 210 test executions passed. Default production features are unchanged.Performance evidence and remaining uncertainty
Two fixed rounds of normal-kernel create/delete benchmarks used 20 measured creates plus 5 warm-ups per batch at concurrency 1/5/10. Across control, candidate and Linux comparison runs, all 360 measured and 90 warm-up lifecycles succeeded. Pooled measurements below use 40 measured creates per variant and concurrency; p95 is nearest-rank.
The concurrency-5 adverse result and concurrency-10 tail increase remain unresolved. Shared-host variation and snapshot state may influence measurements, but their contributions have not been established and do not invalidate the adverse samples. Later packet observations show initial responses crossing the existing health-probe budget and a subsequent retry interval; they do not establish whether this IRQ change caused the initial response delay.
This PR removes unnecessary scheduler entries. It does not claim an overall sandbox creation speedup, absence of performance regression, or completion of the broader performance investigation.