Skip to content

feat(qrm): topology annotations for allocations#1068

Open
JustinChengLZ wants to merge 17 commits intokubewharf:mainfrom
JustinChengLZ:dev/new_topology_annotations
Open

feat(qrm): topology annotations for allocations#1068
JustinChengLZ wants to merge 17 commits intokubewharf:mainfrom
JustinChengLZ:dev/new_topology_annotations

Conversation

@JustinChengLZ
Copy link
Copy Markdown
Collaborator

@JustinChengLZ JustinChengLZ commented Feb 2, 2026

What type of PR is this?

  • New hugepages allocation memory policy
  • New resource allocation annotations for topology

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

@JustinChengLZ JustinChengLZ changed the title feat: topology annotations for allocations feat(qrm): topology annotations for allocations Feb 2, 2026
@JustinChengLZ JustinChengLZ force-pushed the dev/new_topology_annotations branch 6 times, most recently from fd9d0a6 to 1e3021e Compare February 2, 2026 12:28
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 2, 2026

Codecov Report

❌ Patch coverage is 72.54902% with 266 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.56%. Comparing base (edc1181) to head (e079809).
⚠️ Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
...ugins/memory/dynamicpolicy/policy_hint_handlers.go 65.64% 40 Missing and 16 partials ⚠️
pkg/agent/qrm-plugins/memory/dynamicpolicy/util.go 42.04% 49 Missing and 2 partials ⚠️
...memory/dynamicpolicy/policy_allocation_handlers.go 78.77% 33 Missing and 12 partials ⚠️
...g/agent/qrm-plugins/memory/dynamicpolicy/policy.go 65.83% 32 Missing and 9 partials ⚠️
pkg/agent/qrm-plugins/util/util.go 74.24% 12 Missing and 5 partials ⚠️
pkg/agent/qrm-plugins/cpu/dynamicpolicy/policy.go 39.13% 14 Missing ⚠️
...nt/qrm-plugins/memory/dynamicpolicy/state/state.go 52.00% 9 Missing and 3 partials ⚠️
...ns/cpu/dynamicpolicy/policy_allocation_handlers.go 73.91% 3 Missing and 3 partials ⚠️
...ent/qrm-plugins/memory/dynamicpolicy/state/util.go 87.23% 3 Missing and 3 partials ⚠️
pkg/util/machine/topology.go 91.11% 2 Missing and 2 partials ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1068      +/-   ##
==========================================
+ Coverage   61.47%   61.56%   +0.09%     
==========================================
  Files         783      783              
  Lines       73167    73658     +491     
==========================================
+ Hits        44977    45351     +374     
- Misses      23176    23279     +103     
- Partials     5014     5028      +14     
Flag Coverage Δ
unittest 61.56% <72.54%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JustinChengLZ JustinChengLZ force-pushed the dev/new_topology_annotations branch 6 times, most recently from e49703a to 2afa828 Compare March 20, 2026 09:09
@JustinChengLZ JustinChengLZ force-pushed the dev/new_topology_annotations branch 3 times, most recently from d22f30b to 2163af4 Compare April 1, 2026 02:51
@JustinChengLZ JustinChengLZ force-pushed the dev/new_topology_annotations branch from 2163af4 to 8dfdd43 Compare April 7, 2026 13:30
JustinChengLZ and others added 9 commits April 7, 2026 21:32
Add DiscoverMemoryTopology function to calculate normal memory capacity by excluding static hugepages. This enables proper memory accounting in NUMA systems with hugepages configured. The function is now used by the existing Discover method to maintain consistent memory topology information.
Update memory calculations to use NormalMemoryCapacity and NormalMemoryDetails instead of total memory capacity to exclude static hugepages. This provides more accurate resource upper bounds and per-NUMA capacity calculations for memory provisioning and headroom estimation.
Add StaticHugePagesDetails and StaticHugePagesCapacity fields to MemoryTopology
to track static hugepages allocation per NUMA node and system-wide. Update test
cases and dummy topology generation to include these new fields.
luomingmeng and others added 5 commits April 7, 2026 21:32
Static huge pages should not be included in the total available memory calculation as they are reserved and cannot be used for dynamic allocation. This change updates the policy to properly account for static huge pages and adds corresponding test cases to verify the behavior.
…lation

Add GetMemoryTopology interface to ReadonlyState and implement memory topology support in state management. This enables more precise memory capacity calculations by considering NormalMemoryDetails while excluding hugepages. The change affects multiple state generation functions across the codebase to properly handle memory topology information.
feat(qrm-plugin): support reclaimed cores vpa
@JustinChengLZ JustinChengLZ force-pushed the dev/new_topology_annotations branch 2 times, most recently from befdd42 to e7a52e4 Compare April 8, 2026 02:33
@JustinChengLZ JustinChengLZ force-pushed the dev/new_topology_annotations branch from e7a52e4 to 17e2036 Compare April 8, 2026 03:36
@JustinChengLZ JustinChengLZ force-pushed the dev/new_topology_annotations branch from 17e2036 to 3ef3453 Compare April 8, 2026 05:39
@JustinChengLZ JustinChengLZ force-pushed the dev/new_topology_annotations branch from 3ef3453 to ac0dff6 Compare April 8, 2026 05:43
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