Skip to content

feat: implement hugepages resource allocation#1084

Open
JustinChengLZ wants to merge 14 commits intokubewharf:mainfrom
JustinChengLZ:dev/extra-resource-hugepage
Open

feat: implement hugepages resource allocation#1084
JustinChengLZ wants to merge 14 commits intokubewharf:mainfrom
JustinChengLZ:dev/extra-resource-hugepage

Conversation

@JustinChengLZ
Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • Support for multiple resources for memory dynamicPolicy
  • Implement logic for hugepages allocation

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

@JustinChengLZ JustinChengLZ force-pushed the dev/extra-resource-hugepage branch 7 times, most recently from 434b446 to 0516a96 Compare March 12, 2026 12:19
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 70.99237% with 228 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.51%. Comparing base (95c2c56) to head (8b03c8e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ugins/memory/dynamicpolicy/policy_hint_handlers.go 67.08% 37 Missing and 15 partials ⚠️
pkg/agent/qrm-plugins/memory/dynamicpolicy/util.go 22.22% 48 Missing and 1 partial ⚠️
...g/agent/qrm-plugins/memory/dynamicpolicy/policy.go 65.54% 32 Missing and 9 partials ⚠️
...memory/dynamicpolicy/policy_allocation_handlers.go 78.86% 30 Missing and 11 partials ⚠️
pkg/agent/qrm-plugins/util/util.go 77.19% 10 Missing and 3 partials ⚠️
...nt/qrm-plugins/memory/dynamicpolicy/state/state.go 52.00% 9 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 ⚠️
...md/katalyst-agent/app/options/qrm/memory_plugin.go 50.00% 2 Missing ⚠️
pkg/agent/qrm-plugins/commonstate/state.go 80.00% 1 Missing and 1 partial ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1084      +/-   ##
==========================================
+ Coverage   61.46%   61.51%   +0.05%     
==========================================
  Files         783      783              
  Lines       72974    73330     +356     
==========================================
+ Hits        44853    45110     +257     
- Misses      23139    23218      +79     
- Partials     4982     5002      +20     
Flag Coverage Δ
unittest 61.51% <70.99%> (+0.05%) ⬆️

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/extra-resource-hugepage branch from 0516a96 to 5ae504a Compare March 12, 2026 12:42
@JustinChengLZ JustinChengLZ force-pushed the dev/extra-resource-hugepage branch 6 times, most recently from 4847ce3 to a3c4d24 Compare March 24, 2026 06:15
@JustinChengLZ JustinChengLZ force-pushed the dev/extra-resource-hugepage branch 2 times, most recently from 209af97 to a3c4d24 Compare March 31, 2026 09:23
JustinChengLZ and others added 8 commits March 31, 2026 18:41
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.
luomingmeng and others added 5 commits March 31, 2026 18:59
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.
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.
@JustinChengLZ JustinChengLZ force-pushed the dev/extra-resource-hugepage branch 2 times, most recently from 208a731 to 7b53853 Compare March 31, 2026 12:12
feat(qrm-plugin): support reclaimed cores vpa
@JustinChengLZ JustinChengLZ force-pushed the dev/extra-resource-hugepage branch from 7b53853 to 8b03c8e Compare March 31, 2026 13:10
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