Skip to content

fix(priority): correct session desired#436

Merged
k82cn merged 1 commit intoxflops:mainfrom
jinzhejz:enhance_priority_plugin
May 8, 2026
Merged

fix(priority): correct session desired#436
k82cn merged 1 commit intoxflops:mainfrom
jinzhejz:enhance_priority_plugin

Conversation

@jinzhejz
Copy link
Copy Markdown

@jinzhejz jinzhejz commented May 7, 2026

  • Cap Σ ssn_desired ≤ cluster total_slots inside PriorityPlugin.setup
  • Sort open sessions by (priority desc, creation_time asc) before distribution
  • Greedy single-pass grant: ssn_desired = min(compute_demand, remaining)
  • ssn_allocated runtime update via lifecycle callbacks unchanged

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements priority-aware resource distribution within the PriorityPlugin. The core change involves calculating the total available cluster slots during the setup() phase and distributing them among open sessions based on priority (descending) and creation time (ascending) as a tiebreaker. This logic populates a new ssn_desired map, which is_underused now consults to ensure high-priority sessions are prioritized for resource allocation until their calculated share is met. By moving the cluster-capacity cap into the PriorityPlugin, the implementation prevents the aggregate over-allocation issues previously seen in the FairShare plugin. Feedback from the review pointed out a minor typo in the design documentation.

Comment thread docs/designs/RFE413-priority-scheduling/FS.md Outdated
@jinzhejz jinzhejz force-pushed the enhance_priority_plugin branch from 39e29ab to 4ad3a55 Compare May 8, 2026 02:28
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jinzhejz jinzhejz force-pushed the enhance_priority_plugin branch from 4ad3a55 to dfc9a9c Compare May 8, 2026 02:54
@k82cn k82cn merged commit c36d34b into xflops:main May 8, 2026
7 checks passed
@jinzhejz jinzhejz deleted the enhance_priority_plugin branch May 8, 2026 03:27
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.

2 participants