docs(BA-6926): amend BEP-1055 with scope-local job_priority for preemption#12939
Merged
Conversation
…ption Preemption compared the global scheduler priority across all owners, so a user could raise their own priority to evict another owner's sessions. This amendment introduces a separate scope-local axis, job_priority, as the sole victim-comparison key, restricted to the same owner (v1: user scope). - 2.4 Priority Model: three-axis split (scheduler priority / job_priority / fair-share), user vs future project scope, BEP-1014 within-owner caveat - 3.b: victim filter uses job_priority within the same user_uuid; drop the preemptible_priority threshold, keep preemption_order - 3.a: snapshot carries job_priority + user_uuid (scope-owner key) - Keypair resource policy max_priority caps the global priority - Open Questions: cross-tenant preemption as a future admin cross-scope axis Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Amends BEP-1055 to use owner-scoped job_priority for safe preemption.
Changes:
- Defines separate scheduling and preemption priority axes.
- Restricts victims to the same user.
- Adds priority policy and snapshot requirements.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
proposals/BEP-1055-preemption-scheduler-mechanics.md |
Revises the preemption design and priority model. |
changes/12939.doc.md |
Adds the documentation changelog entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| | ➕ | Expose `preemption.enabled` (preemption on/off toggle) and `preemption_min_runtime` (the anti-thrashing knob in section 3) in the RG config | | ||
| | ➕ | On session creation, the user also sets `job_priority` — the session's **scope-local** preemption priority (used only for preemption; see 2.4). Distinct from the global scheduler `priority` | | ||
| | ➕ | Keypair (user) resource policy gains `max_priority` — caps the `priority` a user may declare on session creation (2.4) | | ||
| | ➕ | Remove admin `preemptible_priority` from the RG config — unused once victims are chosen by relative `job_priority` (3.b) | |
| | ➕ | New `SessionStatus.PREEMPTED` — the **single state** for a confirmed victim; after kernel cleanup it branches by mode to **PENDING (reschedule) or TERMINATED (terminate)** (3.(c)) | | ||
| | ➕ | New `preemption_min_runtime` config field (RG opts) | | ||
| | ➕ | New `SessionRow.job_priority` (default 10) — scope-local preemption priority, compared only within the same scope-owner (2.4, 3.b) | | ||
| | ➕ | New keypair resource-policy field `max_priority` — per-user cap on the global `priority` (2.4) | |
|
|
||
| `job_priority` values are **only comparable within one owner** (no global meaning). v1 fixes the owner key to `user_uuid`; wider scopes reuse the same column and only change the owner key used for comparison. | ||
|
|
||
| > The keypair resource policy `max_priority` bounds the global `priority` a user may declare on session creation; `job_priority` needs no such cap since it only reorders the user's own jobs. |
|
|
||
| ## Open Questions | ||
|
|
||
| - Cross-tenant (cross-scope) preemption — v1's same-owner rule cannot evict *another* owner's session. Evicting a different tenant's low-priority work belongs to a separate **admin-managed cross-scope (project) axis**, gated on the "project session" concept, and must not be conflated with the user-declared `job_priority`. |
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.
Summary
job_priorityaxis instead of the global schedulerpriority, which was compared across all owners (a user could raise their ownpriorityto evict another owner's sessions).priority/job_priority/ fair-share), user vs. future project scope, and a caveat on how v1's within-owner rule differs from BEP-1014's cross-tenant motivation.user_uuidand ordered byjob_priorityascending →preemption_order; thepreemptible_priorityabsolute threshold is removed. Snapshot gainsjob_priority+user_uuid; keypair resource policy gainsmax_priorityto cap the globalpriority.Test plan
Resolves BA-6926